mirror of git://git.code.sf.net/p/zsh/code
51670: prevent possible underflow in gettext()
This commit is contained in:
parent
ba3631b414
commit
858b8de3d7
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue