You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by pa...@apache.org on 2005/04/26 18:41:53 UTC

svn commit: r164813 - /spamassassin/branches/3.0/lib/Mail/SpamAssassin/Message.pm

Author: parker
Date: Tue Apr 26 09:41:52 2005
New Revision: 164813

URL: http://svn.apache.org/viewcvs?rev=164813&view=rev
Log:
Bug 4232: Make sure @message has parts before trying to match against them

Modified:
    spamassassin/branches/3.0/lib/Mail/SpamAssassin/Message.pm

Modified: spamassassin/branches/3.0/lib/Mail/SpamAssassin/Message.pm
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.0/lib/Mail/SpamAssassin/Message.pm?rev=164813&r1=164812&r2=164813&view=diff
==============================================================================
--- spamassassin/branches/3.0/lib/Mail/SpamAssassin/Message.pm (original)
+++ spamassassin/branches/3.0/lib/Mail/SpamAssassin/Message.pm Tue Apr 26 09:41:52 2005
@@ -176,7 +176,7 @@
 	# Go onto the next header line, unless the next line is a
 	# multipart mime boundary, where we know we're going to stop
 	# below, so drop through for final header processing.
-        next unless (defined $boundary && $message[0] =~ /^--\Q$boundary\E(?:--|\s*$)/);
+        next unless (defined $boundary && @message && $message[0] =~ /^--\Q$boundary\E(?:--|\s*$)/);
       }
       else {
 	# There was no previous header and this is just "out there"?
@@ -222,7 +222,7 @@
 
     # Alternately, if a multipart mime boundary is found in the header area,
     # aka it's malformed, exit out as well and treat it as part of the body.
-    last if (defined $boundary && $message[0] =~ /^--\Q$boundary\E(?:--|\s*$)/);
+    last if (defined $boundary && @message && $message[0] =~ /^--\Q$boundary\E(?:--|\s*$)/);
   }
 
   # Store the pristine body for later -- store as a copy since @message