diff options
-rw-r--r-- | lr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lr.c b/lr.c index 7f3d8aa..c7ac903 100644 --- a/lr.c +++ b/lr.c @@ -504,7 +504,7 @@ parse_string(char **s) pos++; while (*pos && (*pos != '"' || (*pos == '"' && *(pos+1) == '"'))) { - if (len >= bufsiz) { + if (len + 1 >= bufsiz) { bufsiz = 2*bufsiz + 16; buf = realloc(buf, bufsiz); if (!buf) |