From 8267032adff46dd8dcc04c24f6d5a0441e21aedd Mon Sep 17 00:00:00 2001 From: yoichi Date: Sun, 25 Jan 2004 11:52:12 +0000 Subject: [PATCH] * elsp-bogofilter.el (elmo-spam-bogofilter-register-messages): Protect from infinite loop. --- elmo/ChangeLog | 5 +++++ elmo/elsp-bogofilter.el | 2 ++ 2 files changed, 7 insertions(+) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 5d507c8..f66aed0 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2004-01-25 Yoichi NAKAYAMA + + * elsp-bogofilter.el (elmo-spam-bogofilter-register-messages): + Protect from infinite loop. + 2004-01-25 Hiroya Murata * elsp-bogofilter.el diff --git a/elmo/elsp-bogofilter.el b/elmo/elsp-bogofilter.el index 41adb35..14f0f60 100644 --- a/elmo/elsp-bogofilter.el +++ b/elmo/elsp-bogofilter.el @@ -124,6 +124,8 @@ Must be return a string or list of string." (elsp-bogofilter-register-buffer buffer nil restore)) (defsubst elmo-spam-bogofilter-register-messages (folder numbers spam restore) + (if (not (< 0 elmo-spam-bogofilter-max-messages-per-process)) + (error "non-positive value for `elmo-spam-bogofilter-max-messages-per-process'")) (with-temp-buffer (buffer-disable-undo (current-buffer)) (while numbers -- 1.7.10.4