mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
53820: detect integer overflow when parsing history word designators.
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user