mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 04:40:59 +01:00
49266: fix segfault on metacharacters in long job texts
This commit is contained in:
parent
1508dc7486
commit
d165d408a0
2 changed files with 4 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
2021-09-06 Bart Schaefer <schaefer@zsh.org>
|
2021-09-06 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 49266: fix segfault on metacharacters in long job texts
|
||||||
|
|
||||||
* Marlon Richert: 49218: Functions/Misc/run-help,
|
* Marlon Richert: 49218: Functions/Misc/run-help,
|
||||||
Functions/Misc/run-help-btrfs, Functions/Misc/run-help-git,
|
Functions/Misc/run-help-btrfs, Functions/Misc/run-help-git,
|
||||||
Functions/Misc/run-help-ip, Functions/Misc/run-help-p4,
|
Functions/Misc/run-help-ip, Functions/Misc/run-help-p4,
|
||||||
|
|
|
||||||
|
|
@ -335,6 +335,8 @@ getjobtext(Eprog prog, Wordcode c)
|
||||||
tlim = tptr + JOBTEXTSIZE - 1;
|
tlim = tptr + JOBTEXTSIZE - 1;
|
||||||
tjob = 1;
|
tjob = 1;
|
||||||
gettext2(&s);
|
gettext2(&s);
|
||||||
|
if (tptr[-1] == Meta)
|
||||||
|
--tptr;
|
||||||
*tptr = '\0';
|
*tptr = '\0';
|
||||||
freeeprog(prog); /* mark as unused */
|
freeeprog(prog); /* mark as unused */
|
||||||
untokenize(jbuf);
|
untokenize(jbuf);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue