Commit 3fa472b4 authored by Andreas Schwab's avatar Andreas Schwab

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.
parent 4341aacd
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment