Really simple patch for Entity.pm.  This has been in use on a 
MailScanner/SpamAssassin system for a week, and has processed ~2 million 
messages - including a fresh stack of nasties that trigger the original bug. 



--- ./mime-tools-5.417/lib/MIME/Entity.pm       2005-01-14 06:23:15.000000000 
+1100
+++ /usr/share/perl5/MIME/Entity.pm     2005-10-23 23:56:19.000000000 +1000
@@ -1800,7 +1800,7 @@
        my $part;
        foreach $part ($self->parts) {
            $out->print("--$boundary\n");
-           $part->print($out);
+           if (defined $part) { $part->print($out); }
            $out->print("\n");           ### needed for next delim/close
        }
        $out->print("--$boundary--\n");

 


Reply via email to