From 5f9f981bc10dd6b90395ee66e2ff8f364859bdf8 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 25 Sep 2000 10:35:47 +0000 Subject: [PATCH] (rmail-dont-reply-to): Avoid infinite loop if rmail-dont-reply-to-names matches the empty string. --- lisp/ChangeLog | 5 +++++ lisp/mail/mail-utils.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5ca6697eeca..08d9f19d588 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-09-25 Markus Rost + + * mail/mail-utils.el (rmail-dont-reply-to): Avoid infinite loop if + rmail-dont-reply-to-names matches the empty string. + 2000-09-25 Gerd Moellmann * startup.el (command-line-1, fancy-splash-text): Change the diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index a5d7a6b248c..67e658600d8 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el @@ -223,7 +223,8 @@ Usenet paths ending in an element that matches are removed also." "\\)[^,]*")) (case-fold-search t) pos epos) - (while (setq pos (string-match match userids pos)) + (while (and (setq pos (string-match match userids pos)) + (> (length userids 0))) ;; If there's a match, it starts at the beginning of the string, ;; or with `,'. We must delete from that position to the ;; end of the user-id which starts at match-beginning 2. -- 2.39.5