]> git.eshelyaron.com Git - emacs.git/commitdiff
(cc-imenu-c++-generic-expression): Tweak regexp to avoid overflow.
authorGlenn Morris <rgm@gnu.org>
Wed, 17 Oct 2007 01:37:23 +0000 (01:37 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 17 Oct 2007 01:37:23 +0000 (01:37 +0000)
lisp/ChangeLog
lisp/progmodes/cc-menus.el

index 2e5bb8bd7905e8c5188329f084614fa0b341dd5b..2ea970016ba4509ecbc169c45408603b8253bb41 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-17  Glenn Morris  <rgm@gnu.org>
+
+       * progmodes/cc-menus.el (cc-imenu-c++-generic-expression): Tweak
+       regexp to avoid stack overflow.
+
 2007-10-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * simple.el (reindent-then-newline-and-indent): Don't assume that
index 95359689b9f0f4839e8ac7ee756424aeb6bb4314..eced014d4e6eba0b94dc9be63ae31dea59ba4a9e 100644 (file)
@@ -106,7 +106,9 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.")
     (nil
      ,(concat
        "^\\<"                                 ; line MUST start with word char
-       "[^()]*"                               ; no parentheses before
+       ;; \n added to prevent overflow in regexp matcher.
+       ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-02/msg00021.html
+       "[^()\n]*"                             ; no parentheses before
        "[^" c-alnum "_:<>~]"                  ; match any non-identifier char
        "\\([" c-alpha "_][" c-alnum "_:<>~]*\\)" ; match function name
        "\\([ \t\n]\\|\\\\\n\\)*("            ; see above, BUT the arg list