Skip Menu |
 
Queue is disabled
This queue is disabled and you may not create new tickets in it. Disabled queues are usually because the distribution was merged with another or changed names. Sometimes they are the end result of a bad autocreate from PAUSE data before anyone noticed.
Report information
The Basics
Id: 13925
Status: resolved
Priority: 0/
Queue: Email-MIME-Modifier

People
Owner: Nobody in particular
Requestors: tallison [...] tacocat.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.42
Fixed in: (no value)



Subject: empty @parts on line 244-ish causes critical error
Download (untitled) / with headers
text/plain 2.5k
Email::MIME::Modifier->parts_set takes args of $self and $parts. if $parts is a ref to an ARRAY of [] or $#$parts < 0 the logic branch of 233 if ( @{$parts} > 1 ) { # setup multipart 243 } else { # setup singlepart 244 $body .= $parts->[0]->body; Fails @ line 244 because $parts->[0]->body is undefined. inserting a line prior to line 233 of return if $#$parts < 0; prevents the error however it might be better to change the 'else' to an 'elsif ($#$parts = 0)'.... This is generated when you run into a message like with the following structures, these are taken from MIME::Tools and MIME::Entity dump_skeleton The skeleton of this message looks like: Content-type: multipart/signed Effective-type: multipart/signed Body-file: NONE Subject: Re: way to output spreadsheets to postscript or PDF programmatically Num-parts: 2 -- Content-type: multipart/mixed Effective-type: multipart/mixed Body-file: NONE Num-parts: 2 -- Content-type: text/plain Effective-type: text/plain Body-file: /tmp/msg-20230-420.txt -- Content-type: application/octet-stream Effective-type: application/octet-stream Body-file: /tmp/dblatex-12.tar.gz Recommended-filename: dblatex.tar.gz -- Content-type: application/pgp-signature Effective-type: application/pgp-signature Body-file: /tmp/signature-2806.asc Recommended-filename: signature.asc -- The skeleton of this message looks like: Content-type: multipart/mixed Effective-type: multipart/mixed Body-file: NONE Subject: Fwd: Re: bcm5700 driver installation problem Num-parts: 2 -- Content-type: multipart/alternative Effective-type: multipart/alternative Body-file: NONE Num-parts: 2 -- Content-type: text/plain Effective-type: text/plain Body-file: /tmp/msg-20230-430.txt -- Content-type: text/html Effective-type: text/html Body-file: /tmp/msg-20230-431.html -- Content-type: message/rfc822 Effective-type: message/rfc822 Body-file: NONE Num-parts: 1 -- Content-type: multipart/alternative Effective-type: multipart/alternative Body-file: NONE Subject: Re: bcm5700 driver installation problem Num-parts: 2 -- Content-type: text/plain Effective-type: text/plain Body-file: /tmp/msg-20230-432.txt -- Content-type: text/html Effective-type: text/html Body-file: /tmp/msg-20230-433.html --
Download (untitled) / with headers
text/plain 764b
[guest - Sat Jul 30 09:51:50 2005]: Show quoted text
> Email::MIME::Modifier->parts_set takes args of $self and $parts. > if $parts is a ref to an ARRAY of [] > or $#$parts < 0 > the logic branch of > 233 if ( @{$parts} > 1 ) { # setup multipart > 243 } else { # setup singlepart > 244 $body .= $parts->[0]->body; > Fails @ line 244 because $parts->[0]->body is undefined. > > inserting a line prior to line 233 of > return if $#$parts < 0; > prevents the error however it might be better to change the 'else' to > an 'elsif ($#$parts = 0)'.... > > This is generated when you run into a message like with the following > structures, these are taken from MIME::Tools and MIME::Entity > dump_skeleton >
This actually fixes several other bugs under Email::MIME
Download (untitled) / with headers
text/plain 167b
I believe this bug is fixed in Subversion, but confirmation would be appreciated. You will need to update Creator and Modifier. http://pep.pobox.com/svn/ -- rjbs


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.