commit 01ac84109c99e94bf61c0a4039c76b8af289c499
parent 36cc28e4446e77ab4d8d48055e9715f1ae26c68e
Author: tedu <tedu>
Date: Fri, 27 Nov 2015 21:10:17 +0000
after reading a too long line, restart at the beginning of the buffer so
we don't keep writing past the end. (the perils of trying to recover from
parse errors.)
noticed by Jan Schreiber
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/parse.y b/parse.y
@@ -311,8 +311,10 @@ repeat:
}
}
*p++ = c;
- if (p == ebuf)
+ if (p == ebuf) {
yyerror("too long line");
+ p = buf;
+ }
escape = 0;
}