aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/awkgram.y b/awkgram.y
index 88f5e209..7805f144 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -2316,7 +2316,8 @@ yyerror(const char *m, ...)
count = strlen(mesg) + 1;
if (lexptr != NULL)
count += (lexeme - thisline) + 2;
- emalloc(buf, char *, count, "yyerror");
+ emalloc(buf, char *, count+1, "yyerror");
+ memset(buf, 0, count+1);
bp = buf;