emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 3fa472b: Fix undefined behaviour while looking fo


From: Andreas Schwab
Subject: [Emacs-diffs] emacs-26 3fa472b: Fix undefined behaviour while looking for lexical-binding file variable (bug 31186)
Date: Tue, 17 Apr 2018 05:47:57 -0400 (EDT)

branch: emacs-26
commit 3fa472b4873b395e6f9400884ee22b66c0a86966
Author: Andreas Schwab <address@hidden>
Commit: Andreas Schwab <address@hidden>

    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.
---
 src/lread.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lread.c b/src/lread.c
index 3104c44..72523c0 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]