mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
51670: prevent possible underflow in gettext()
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2023-04-22 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 51670: Src/text.c: prevent possible underflow in gettext()
|
||||
|
||||
2023-04-18 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||
|
||||
* 51663: Completion/Unix/Command/_ssh: fix a typo in 51582
|
||||
|
||||
@@ -335,7 +335,7 @@ getjobtext(Eprog prog, Wordcode c)
|
||||
tlim = tptr + JOBTEXTSIZE - 1;
|
||||
tjob = 1;
|
||||
gettext2(&s);
|
||||
if (tptr[-1] == Meta)
|
||||
if (tptr > jbuf && tptr[-1] == Meta)
|
||||
--tptr;
|
||||
*tptr = '\0';
|
||||
freeeprog(prog); /* mark as unused */
|
||||
|
||||
Reference in New Issue
Block a user