diff options
author | Wayne Davison <wayned@users.sourceforge.net> | 2004-10-17 20:12:46 +0000 |
---|---|---|
committer | Wayne Davison <wayned@users.sourceforge.net> | 2004-10-17 20:12:46 +0000 |
commit | 66baaced5d84dce7f1902d80c954a078c1d2456f (patch) | |
tree | 5406ed307d233dc563ff966b73ad8087ea3810b0 /Src | |
parent | d73354ba3ca3ad3fe7ebdaa7f10bc784ce29d07a (diff) | |
download | zsh-66baaced5d84dce7f1902d80c954a078c1d2456f.tar.gz zsh-66baaced5d84dce7f1902d80c954a078c1d2456f.tar.xz zsh-66baaced5d84dce7f1902d80c954a078c1d2456f.zip |
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".
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 48511e017..549ee21af 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -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; |