aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/awkgram.y b/awkgram.y
index e04c2c65..d723f510 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -1443,7 +1443,7 @@ common_exp
n1 = force_string(n1);
n2 = force_string(n2);
nlen = n1->stlen + n2->stlen;
- erealloc(n1->stptr, char *, nlen + 2, "constant fold");
+ erealloc(n1->stptr, char *, nlen + 1, "constant fold");
memcpy(n1->stptr + n1->stlen, n2->stptr, n2->stlen);
n1->stlen = nlen;
n1->stptr[nlen] = '\0';
@@ -2223,7 +2223,7 @@ yyerror(const char *m, ...)
if (mesg == NULL)
mesg = m;
- count = (bp - thisline) + strlen(mesg) + 2 + 1;
+ count = (bp - thisline) + strlen(mesg) + 1 + 1;
emalloc(buf, char *, count, "yyerror");
bp = buf;