aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1999-06-04 18:36:35 +0000
committerKarl Heuer1999-06-04 18:36:35 +0000
commite011fd6b5c1f758557ea5f7e531a35c3fb941295 (patch)
tree822187087ce8833d4865612e4295d3f618fa8ca9
parenta8197cfe373baad36a0b635da430cd74cb5f4317 (diff)
downloademacs-e011fd6b5c1f758557ea5f7e531a35c3fb941295.tar.gz
emacs-e011fd6b5c1f758557ea5f7e531a35c3fb941295.zip
(regexp-opt-group): Avoid infinite
recursion on bogus input.
-rw-r--r--lisp/emacs-lisp/regexp-opt.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index 589f1b70ac4..6627c20a7bf 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -141,7 +141,9 @@ in REGEXP."
141 (open-charset (if lax "" open-group)) 141 (open-charset (if lax "" open-group))
142 (close-charset (if lax "" close-group))) 142 (close-charset (if lax "" close-group)))
143 (cond 143 (cond
144 ;; 144 ;; Protect against user-stupidity... could call error here
145 ((null strings)
146 nil)
145 ;; If there is only one string, just return it. 147 ;; If there is only one string, just return it.
146 ((= (length strings) 1) 148 ((= (length strings) 1)
147 (if (= (length (car strings)) 1) 149 (if (= (length (car strings)) 1)