about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@ipost.com>2021-09-06 13:55:44 -0700
committerBart Schaefer <schaefer@ipost.com>2021-09-06 13:55:44 -0700
commitd165d408a088a432cae04b86c5bc312de3cc3acb (patch)
tree374e7adf5088faf1810ef6f058bca72a94d44c2c /Src
parent1508dc7486636edcb54e81f6a2fcf0faf180c7fa (diff)
downloadzsh-d165d408a088a432cae04b86c5bc312de3cc3acb.tar.gz
zsh-d165d408a088a432cae04b86c5bc312de3cc3acb.tar.xz
zsh-d165d408a088a432cae04b86c5bc312de3cc3acb.zip
49266: fix segfault on metacharacters in long job texts
Diffstat (limited to 'Src')
-rw-r--r--Src/text.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/text.c b/Src/text.c
index 4bf88f2e2..5cd7685fd 100644
--- a/Src/text.c
+++ b/Src/text.c
@@ -335,6 +335,8 @@ getjobtext(Eprog prog, Wordcode c)
     tlim = tptr + JOBTEXTSIZE - 1;
     tjob = 1;
     gettext2(&s);
+    if (tptr[-1] == Meta)
+	--tptr;
     *tptr = '\0';
     freeeprog(prog);		/* mark as unused */
     untokenize(jbuf);