From 01ac84109c99e94bf61c0a4039c76b8af289c499 Mon Sep 17 00:00:00 2001 From: tedu Date: Fri, 27 Nov 2015 21:10:17 +0000 Subject: [PATCH] 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 --- parse.y | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.39.2