emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/syntax.c


From: Kim F . Storm
Subject: [Emacs-diffs] Changes to emacs/src/syntax.c
Date: Tue, 15 Jun 2004 09:54:31 -0400

Index: emacs/src/syntax.c
diff -c emacs/src/syntax.c:1.173 emacs/src/syntax.c:1.174
*** emacs/src/syntax.c:1.173    Sun Jun 13 22:25:34 2004
--- emacs/src/syntax.c  Tue Jun 15 09:42:31 2004
***************
*** 1455,1461 ****
            {
              const unsigned char *class_beg = str + i_byte + 1;
              const unsigned char *class_end = class_beg;
!             const unsigned char *class_limit = str + size_byte;
              /* Leave room for the null.        */
              unsigned char class_name[CHAR_CLASS_MAX_LENGTH + 1];
              re_wctype_t cc;
--- 1455,1461 ----
            {
              const unsigned char *class_beg = str + i_byte + 1;
              const unsigned char *class_end = class_beg;
!             const unsigned char *class_limit = str + size_byte - 2;
              /* Leave room for the null.        */
              unsigned char class_name[CHAR_CLASS_MAX_LENGTH + 1];
              re_wctype_t cc;
***************
*** 1463,1479 ****
              if (class_limit - class_beg > CHAR_CLASS_MAX_LENGTH)
                class_limit = class_beg + CHAR_CLASS_MAX_LENGTH;
  
!             while (class_end != class_limit
!                    && ! (*class_end >= 0200
!                          || *class_end <= 040
!                          || (*class_end == ':'
!                              && class_end[1] == ']')))
                class_end++;
  
!             if (class_end == class_limit
!                 || *class_end >= 0200
!                 || *class_end <= 040)
!               error ("Invalid ISO C character class");
  
              bcopy (class_beg, class_name, class_end - class_beg);
              class_name[class_end - class_beg] = 0;
--- 1463,1475 ----
              if (class_limit - class_beg > CHAR_CLASS_MAX_LENGTH)
                class_limit = class_beg + CHAR_CLASS_MAX_LENGTH;
  
!             while (class_end < class_limit
!                    && *class_end >= 'a' && *class_end <= 'z')
                class_end++;
  
!             if (class_end == class_beg
!                 || *class_end != ':' || class_end[1] != ']')
!               goto not_a_class_name;
  
              bcopy (class_beg, class_name, class_end - class_beg);
              class_name[class_end - class_beg] = 0;
***************
*** 1488,1493 ****
--- 1484,1490 ----
              continue;
            }
  
+       not_a_class_name:
          if (c == '\\')
            {
              if (i_byte == size_byte)




reply via email to

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