changeset 79114:5a26fd1686ae

(cc-imenu-c++-generic-expression): Tweak regexp to avoid overflow.
author Glenn Morris <rgm@gnu.org>
date Wed, 17 Oct 2007 01:36:24 +0000
parents 72e8c1dc7591
children c49f8a937799
files lisp/progmodes/cc-menus.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-menus.el	Wed Oct 17 01:36:10 2007 +0000
+++ b/lisp/progmodes/cc-menus.el	Wed Oct 17 01:36:24 2007 +0000
@@ -106,7 +106,9 @@
     (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