]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix undefined behaviour while looking for lexical-binding file variable (bug 31186)
authorAndreas Schwab <schwab@suse.de>
Tue, 17 Apr 2018 09:36:36 +0000 (11:36 +0200)
committerAndreas Schwab <schwab@suse.de>
Tue, 17 Apr 2018 09:43:14 +0000 (11:43 +0200)
* src/lread.c (lisp_file_lexically_bound_p): Reset
beg_end_state before reading variable or value.

src/lread.c

index 3104c441ecfd480af93c7b5fe2521be91192a745..72523c057f17ddc399d508172611f9f1f3c3b582 100644 (file)
@@ -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)