From 04b0a192798804088ed75c39371a663c97e12d2a Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sat, 31 May 2014 20:14:53 +1000 Subject: [PATCH] parsergen: don't leave garbage in the $0 buffer. As this is static it gets reused. We are likely to free pointers in it, so after doing that we should make sure it gets zeroed. Signed-off-by: NeilBrown --- csrc/parsergen.mdc | 1 + 1 file changed, 1 insertion(+) diff --git a/csrc/parsergen.mdc b/csrc/parsergen.mdc index 8112143..fbb561c 100644 --- a/csrc/parsergen.mdc +++ b/csrc/parsergen.mdc @@ -2642,6 +2642,7 @@ since the last state which could have been at the start of a line. pop(&p, size, do_free); shift(&p, memdup(buf, bufsize), states); + memset(buf, 0, bufsize); if (prod == 0) accepted = 1; continue; -- 2.43.0