From 8d4c98540de9bcdba8565facc91fbc45855d27e2 Mon Sep 17 00:00:00 2001 From: Paulo Andrade Date: Tue, 3 Jan 2017 12:29:34 +0100 Subject: 40260: zero new space allocated in prompt buffer --- Src/prompt.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Src/prompt.c') 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; -- cgit 1.4.1