SOURCES: archivemail-invalid-message.patch (NEW) - do not end loop...

glen glen at pld-linux.org
Tue Sep 18 12:48:54 CEST 2007


Author: glen                         Date: Tue Sep 18 10:48:54 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- do not end loop when encounter empty message (contains just \n). #1783369

---- Files affected:
SOURCES:
   archivemail-invalid-message.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/archivemail-invalid-message.patch
diff -u /dev/null SOURCES/archivemail-invalid-message.patch:1.1
--- /dev/null	Tue Sep 18 12:48:54 2007
+++ SOURCES/archivemail-invalid-message.patch	Tue Sep 18 12:48:49 2007
@@ -0,0 +1,15 @@
+--- /usr/bin/archivemail~	2007-09-18 13:46:04.000000000 +0300
++++ /usr/bin/archivemail	2007-09-18 13:46:06.983211472 +0300
+@@ -1251,7 +1252,11 @@
+     cache = IdentityCache(mailbox_name)
+ 
+     msg = original.next()
+-    while (msg):
++    while msg is not None:
++        if not msg:
++            vprint("ignoring invalid message")
++            msg = original.next()
++            continue
+         msg_size = sizeof_message(msg)
+         stats.another_message(msg_size)
+         vprint("processing message '%s'" % msg.get('Message-ID'))
================================================================


More information about the pld-cvs-commit mailing list