mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-28 17:10:59 +01:00
In zleread(), initialize the first byte of the "line" buffer to '\0'
so that functions such as magicspace() won't be accessing uninitialized memory when they look at "line".
This commit is contained in:
parent
d73354ba3c
commit
66baaced5d
1 changed files with 1 additions and 0 deletions
|
|
@ -815,6 +815,7 @@ zleread(char **lp, char **rp, int flags, int context)
|
|||
histline = curhist;
|
||||
undoing = 1;
|
||||
line = (unsigned char *)zalloc((linesz = 256) + 2);
|
||||
*line = '\0';
|
||||
virangeflag = lastcmd = done = cs = ll = mark = 0;
|
||||
vichgflag = 0;
|
||||
viinsbegin = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue