From: tedu Date: Fri, 27 Nov 2015 21:10:17 +0000 (+0000) Subject: after reading a too long line, restart at the beginning of the buffer so X-Git-Tag: v6.8.1~6 X-Git-Url: https://git.armaanb.net/?p=opendoas.git;a=commitdiff_plain;h=01ac84109c99e94bf61c0a4039c76b8af289c499 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 --- diff --git a/parse.y b/parse.y index 9ddca34..c50378a 100644 --- 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; }