You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2005/03/27 22:07:48 UTC

[Bug 4232] New: multipart message with 0 parts -> uninitialized in m// (with patch)

http://bugzilla.spamassassin.org/show_bug.cgi?id=4232

           Summary: multipart message with 0 parts -> uninitialized in m//
                    (with patch)
           Product: Spamassassin
           Version: 3.0.2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: spamassassin
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: ejb@ql.org


A multipart message with a specified boundary but with no messages at all will
generate:

Use of uninitialized value in pattern match (m//) at
.../Mail/SpamAssassin/Message.pm line 225.

when running sa-learn.  This output can be obtained by running

sa-learn --spam bad-msg

where bad-msg is the attached message.  Simply checking to make sure @message
has at least one part before doing the check on line 225 of Message.pm is
sufficient to avoid the problem.  I have also attached a patch that fixes this
problem.  The patch is relative to Message.pm as distributed with SpamAssassin
3.0.2.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4232] multipart message with 0 parts -> uninitialized in m// (with patch)

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4232


felicity@kluge.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Future                      |3.0.3




------- Additional Comments From felicity@kluge.net  2005-03-27 14:18 -------
thanks for the report.  I can reproduce this via 3.0.x, but this is not an issue
in 3.1 (the section of Message.pm in question was rewritten via bug 4171).

I'm moving the ticket to the 3.0.3 queue, in the (unlikely) event we do a 3.0.3
release.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4232] [review] multipart message with 0 parts -> uninitialized in m// (with patch)

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4232


parkerm@pobox.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|multipart message with 0    |[review] multipart message
                   |parts -> uninitialized in   |with 0 parts ->
                   |m// (with patch)            |uninitialized in m// (with
                   |                            |patch)




------- Additional Comments From parkerm@pobox.com  2005-04-22 13:01 -------
Please review for 3.0.3



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4232] [review] multipart message with 0 parts -> uninitialized in m// (with patch)

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4232





------- Additional Comments From parkerm@pobox.com  2005-04-24 19:37 -------
Subject: Re:  [review] multipart message with 0 parts -> uninitialized in m// (with patch)

+1

Michael




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4232] [review] multipart message with 0 parts -> uninitialized in m// (with patch)

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4232


parkerm@pobox.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From parkerm@pobox.com  2005-04-26 09:42 -------
Committed revision 164813.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4232] multipart message with 0 parts -> uninitialized in m// (with patch)

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4232





------- Additional Comments From ejb@ql.org  2005-03-27 12:11 -------
Created an attachment (id=2737)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2737&action=view)
patch to Message.pm from 3.0.2 that fixes the problem

This patch checks to make sure $message[0] will exist before testing against
it.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4232] multipart message with 0 parts -> uninitialized in m// (with patch)

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4232





------- Additional Comments From ejb@ql.org  2005-03-27 12:10 -------
Created an attachment (id=2736)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2736&action=view)
raw message used to reproduce this bug

observe that the last mime part in this message is a message/rfc822-headers
including headers for a multipart/mixed but no message parts.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4232] [review] multipart message with 0 parts -> uninitialized in m// (with patch)

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4232


spamassassin@dostech.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|                            |can be committed






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4232] multipart message with 0 parts -> uninitialized in m// (with patch)

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4232


parkerm@pobox.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #2737 is|0                           |1
           obsolete|                            |




------- Additional Comments From parkerm@pobox.com  2005-04-22 13:01 -------
Created an attachment (id=2801)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2801&action=view)
Patch for 3.0 branch

Here is a patch.  It's almost the same as the one provided, just without the
unecessary scalar.  Trying to think of a way to write a test for this, but
nothing is coming to me.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4232] multipart message with 0 parts -> uninitialized in m// (with patch)

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4232





------- Additional Comments From ejb@ql.org  2005-03-27 12:13 -------
Although it's not terribly important or relevant, I'll mention that this is a
bounce from a message that forged my address as its sender....



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4232] [review] multipart message with 0 parts -> uninitialized in m// (with patch)

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4232





------- Additional Comments From jm@jmason.org  2005-04-22 13:28 -------
+1



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4232] [review] multipart message with 0 parts -> uninitialized in m// (with patch)

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4232





------- Additional Comments From spamassassin@dostech.ca  2005-04-24 19:36 -------
+1



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4232] [review] multipart message with 0 parts -> uninitialized in m// (with patch)

Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4232


felicity@kluge.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #2801 is|0                           |1
           obsolete|                            |




------- Additional Comments From felicity@kluge.net  2005-04-24 19:35 -------
Created an attachment (id=2807)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2807&action=view)
new patch for 3.0

same as 2801, but adds @message check to another section that could have the
same problem.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.