diff options
| author | Bart Schaefer <schaefer@zsh.org> | 2023-04-22 14:40:23 -0700 |
|---|---|---|
| committer | Bart Schaefer <schaefer@zsh.org> | 2023-04-22 14:40:23 -0700 |
| commit | 858b8de3d70fe76a3637c281bc2c8e3a6d961a2c (patch) | |
| tree | dc6f94316593f63a5feb53cd0c5d3e3edadb91bc | |
| parent | 51663: fix a typo in 51582 (_ssh) (diff) | |
| download | zsh-858b8de3d70fe76a3637c281bc2c8e3a6d961a2c.tar zsh-858b8de3d70fe76a3637c281bc2c8e3a6d961a2c.tar.gz zsh-858b8de3d70fe76a3637c281bc2c8e3a6d961a2c.tar.bz2 zsh-858b8de3d70fe76a3637c281bc2c8e3a6d961a2c.tar.lz zsh-858b8de3d70fe76a3637c281bc2c8e3a6d961a2c.tar.xz zsh-858b8de3d70fe76a3637c281bc2c8e3a6d961a2c.tar.zst zsh-858b8de3d70fe76a3637c281bc2c8e3a6d961a2c.zip | |
51670: prevent possible underflow in gettext()
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | Src/text.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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 diff --git a/Src/text.c b/Src/text.c index 56127c457..8b1bd96b6 100644 --- a/Src/text.c +++ b/Src/text.c @@ -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 */ |
