]> 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:36:24 +0000 (01:36 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 17 Oct 2007 01:36:24 +0000 (01:36 +0000)
lisp/progmodes/cc-menus.el

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