1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00

49890: Avoid scanning unallocated memory in saved command line.

This commit is contained in:
Peter Stephenson 2022-03-28 15:27:51 +01:00
parent 57305cf245
commit 1e814ba48b
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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;
}