1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-01 21:51:40 +02:00

53820: detect integer overflow when parsing history word designators.

This commit is contained in:
Bart Schaefer 2025-07-13 10:26:09 -07:00
parent f5abf18f2c
commit 9dcd08e585
2 changed files with 10 additions and 0 deletions

View file

@ -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

View file

@ -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);