From 66baaced5d84dce7f1902d80c954a078c1d2456f Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 17 Oct 2004 20:12:46 +0000 Subject: 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". --- Src/Zle/zle_main.c | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v1.2.3