]> git.eshelyaron.com Git - emacs.git/commitdiff
(regexp-opt-group): Avoid infinite
authorKarl Heuer <kwzh@gnu.org>
Fri, 4 Jun 1999 18:36:35 +0000 (18:36 +0000)
committerKarl Heuer <kwzh@gnu.org>
Fri, 4 Jun 1999 18:36:35 +0000 (18:36 +0000)
recursion on bogus input.

lisp/emacs-lisp/regexp-opt.el

index 589f1b70ac4508cf78209125e81a9abae43afd4c..6627c20a7bf165a7b64535882084157febd38131 100644 (file)
@@ -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)