diff options
author | Peter Stephenson <p.stephenson@samsung.com> | 2022-03-28 15:27:51 +0100 |
---|---|---|
committer | Peter Stephenson <p.stephenson@samsung.com> | 2022-03-28 15:27:51 +0100 |
commit | 1e814ba48bd92fcf573b4c58eca109ed93508651 (patch) | |
tree | 2d9990dff5679228b0a79c1950e985ef3860d9fc /Src | |
parent | 57305cf245853b8b30895b41a90142dffab97e38 (diff) | |
download | zsh-1e814ba48bd92fcf573b4c58eca109ed93508651.tar.gz zsh-1e814ba48bd92fcf573b4c58eca109ed93508651.tar.xz zsh-1e814ba48bd92fcf573b4c58eca109ed93508651.zip |
49890: Avoid scanning unallocated memory in saved command line.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c index c85f8450d..526216fa7 100644 --- a/Src/Zle/zle_utils.c +++ b/Src/Zle/zle_utils.c @@ -1530,7 +1530,7 @@ mkundoent(void) struct change *ch; UNMETACHECK(); - if(lastll == zlell && !ZS_memcmp(lastline, zleline, zlell)) { + if(lastll == zlell && lastlinesz >= zlell && !ZS_memcmp(lastline, zleline, zlell)) { lastcs = zlecs; return; } |