diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/Zle/zle_utils.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 21d68de57..7603b7cf6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2022-03-28 Peter Stephenson <p.stephenson@samsung.com> + + * 49890: Src/Zle/zle_utils.c: best not to look at unallocated + memory in saved command line. + 2022-03-24 Peter Stephenson <p.stephenson@samsung.com> * 49875: Completion/Unix/Command/_texinfo: info -f completes 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; } |