Mercurial > emacs
changeset 24810:d2cb43703bfb
(regexp-opt-group): Avoid infinite
recursion on bogus input.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 04 Jun 1999 18:36:35 +0000 |
parents | 078e0b907e6e |
children | adcead6b7ce1 |
files | lisp/emacs-lisp/regexp-opt.el |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/regexp-opt.el Fri Jun 04 18:22:55 1999 +0000 +++ b/lisp/emacs-lisp/regexp-opt.el Fri Jun 04 18:36:35 1999 +0000 @@ -141,7 +141,9 @@ (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)