about summary refs log tree commit diff
path: root/Src/prompt.c
diff options
context:
space:
mode:
authorPaulo Andrade <pandrade@redhat.com>2017-01-03 12:29:34 +0100
committerPeter Stephenson <pws@zsh.org>2017-01-03 12:00:18 +0000
commit8d4c98540de9bcdba8565facc91fbc45855d27e2 (patch)
treed4b97226dbff8f21f1b3563fc89e372139ea6b66 /Src/prompt.c
parent4fb4ce190ccb45991979deed503ff3bdfc56ccf2 (diff)
downloadzsh-8d4c98540de9bcdba8565facc91fbc45855d27e2.tar.gz
zsh-8d4c98540de9bcdba8565facc91fbc45855d27e2.tar.xz
zsh-8d4c98540de9bcdba8565facc91fbc45855d27e2.zip
40260: zero new space allocated in prompt buffer
Diffstat (limited to 'Src/prompt.c')
-rw-r--r--Src/prompt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Src/prompt.c b/Src/prompt.c
index ee77c8bc8..29e006e0e 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -920,6 +920,7 @@ addbufspc(int need)
 	if(need & 255)
 	    need = (need | 255) + 1;
 	bv->buf = realloc(bv->buf, bv->bufspc += need);
+	memset(bv->buf + bv->bufspc - need, 0, need);
 	bv->bp = bv->buf + bo;
 	if(bo1 != -1)
 	    bv->bp1 = bv->buf + bo1;