mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-27 15:01:00 +01:00
51670: prevent possible underflow in gettext()
This commit is contained in:
parent
ba3631b414
commit
858b8de3d7
2 changed files with 5 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue