diff options
author | Karl Heuer <kwzh@gnu.org> | 1999-06-04 18:36:35 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1999-06-04 18:36:35 +0000 |
commit | e011fd6b5c1f758557ea5f7e531a35c3fb941295 (patch) | |
tree | 822187087ce8833d4865612e4295d3f618fa8ca9 /lisp/emacs-lisp/regexp-opt.el | |
parent | a8197cfe373baad36a0b635da430cd74cb5f4317 (diff) | |
download | emacs-e011fd6b5c1f758557ea5f7e531a35c3fb941295.tar.gz emacs-e011fd6b5c1f758557ea5f7e531a35c3fb941295.tar.bz2 emacs-e011fd6b5c1f758557ea5f7e531a35c3fb941295.zip |
(regexp-opt-group): Avoid infinite
recursion on bogus input.
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
-rw-r--r-- | lisp/emacs-lisp/regexp-opt.el | 4 |
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." (open-charset (if lax "" open-group)) (close-charset (if lax "" close-group))) (cond - ;; + ;; Protect against user-stupidity... could call error here + ((null strings) + nil) ;; If there is only one string, just return it. ((= (length strings) 1) (if (= (length (car strings)) 1) |