mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 10:01:11 +02:00
53820: detect integer overflow when parsing history word designators.
This commit is contained in:
parent
f5abf18f2c
commit
9dcd08e585
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2025-07-13 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 53820: Src/hist.c: detect integer overflow when parsing
|
||||||
|
history word designators.
|
||||||
|
|
||||||
2025-06-01 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
2025-06-01 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||||
|
|
||||||
* 53807: Completion/Darwin/Command/_nettop: new completion
|
* 53807: Completion/Darwin/Command/_nettop: new completion
|
||||||
|
|
|
@ -1800,6 +1800,11 @@ getargspec(int argc, int marg, int evset)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
while (idigit(c)) {
|
while (idigit(c)) {
|
||||||
ret = ret * 10 + c - '0';
|
ret = ret * 10 + c - '0';
|
||||||
|
if (ret < 0) {
|
||||||
|
herrflush();
|
||||||
|
zerr("no such word in event");
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
c = ingetc();
|
c = ingetc();
|
||||||
}
|
}
|
||||||
inungetc(c);
|
inungetc(c);
|
||||||
|
|
Loading…
Reference in a new issue