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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user