From: Andreas Schwab Date: Tue, 17 Apr 2018 09:36:36 +0000 (+0200) Subject: Fix undefined behaviour while looking for lexical-binding file variable (bug 31186) X-Git-Tag: emacs-26.1~72 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3fa472b4873b395e6f9400884ee22b66c0a86966;p=emacs.git Fix undefined behaviour while looking for lexical-binding file variable (bug 31186) * src/lread.c (lisp_file_lexically_bound_p): Reset beg_end_state before reading variable or value. --- diff --git a/src/lread.c b/src/lread.c index 3104c441ecf..72523c057f1 100644 --- a/src/lread.c +++ b/src/lread.c @@ -896,6 +896,7 @@ lisp_file_lexically_bound_p (Lisp_Object readcharfun) ch = READCHAR; i = 0; + beg_end_state = NOMINAL; while (ch != ':' && ch != '\n' && ch != EOF && in_file_vars) { if (i < sizeof var - 1) @@ -921,6 +922,7 @@ lisp_file_lexically_bound_p (Lisp_Object readcharfun) ch = READCHAR; i = 0; + beg_end_state = NOMINAL; while (ch != ';' && ch != '\n' && ch != EOF && in_file_vars) { if (i < sizeof val - 1)