aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2007-10-17 01:37:23 +0000
committerGlenn Morris2007-10-17 01:37:23 +0000
commitf3523b17a8cf4d4d5babc8a8e75cf7004fbb8d48 (patch)
treeb02aec53dc76156bc77f4dba9dcb0b248b6bab17
parent94b9aaa27dfacc84953fa4e52d664edebc6dbbba (diff)
downloademacs-f3523b17a8cf4d4d5babc8a8e75cf7004fbb8d48.tar.gz
emacs-f3523b17a8cf4d4d5babc8a8e75cf7004fbb8d48.zip
(cc-imenu-c++-generic-expression): Tweak regexp to avoid overflow.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/cc-menus.el4
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2e5bb8bd790..2ea970016ba 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-10-17 Glenn Morris <rgm@gnu.org>
2
3 * progmodes/cc-menus.el (cc-imenu-c++-generic-expression): Tweak
4 regexp to avoid stack overflow.
5
12007-10-16 Stefan Monnier <monnier@iro.umontreal.ca> 62007-10-16 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * simple.el (reindent-then-newline-and-indent): Don't assume that 8 * simple.el (reindent-then-newline-and-indent): Don't assume that
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el
index 95359689b9f..eced014d4e6 100644
--- a/lisp/progmodes/cc-menus.el
+++ b/lisp/progmodes/cc-menus.el
@@ -106,7 +106,9 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.")
106 (nil 106 (nil
107 ,(concat 107 ,(concat
108 "^\\<" ; line MUST start with word char 108 "^\\<" ; line MUST start with word char
109 "[^()]*" ; no parentheses before 109 ;; \n added to prevent overflow in regexp matcher.
110 ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-02/msg00021.html
111 "[^()\n]*" ; no parentheses before
110 "[^" c-alnum "_:<>~]" ; match any non-identifier char 112 "[^" c-alnum "_:<>~]" ; match any non-identifier char
111 "\\([" c-alpha "_][" c-alnum "_:<>~]*\\)" ; match function name 113 "\\([" c-alpha "_][" c-alnum "_:<>~]*\\)" ; match function name
112 "\\([ \t\n]\\|\\\\\n\\)*(" ; see above, BUT the arg list 114 "\\([ \t\n]\\|\\\\\n\\)*(" ; see above, BUT the arg list