aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/awkgram.c b/awkgram.c
index f8f80ad5..b37ee57a 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -4736,7 +4736,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;