Re: MailBox Bug: space after "boundary" element causes proc to wedge

"Anthony D. Urso" <[email protected]> Sun, 17 Oct 2004 16:13:38 -0700
Newsgroups gmane.comp.lang.perl.modules.mail-box
Message-ID <[email protected]>
I've found the problem.

Line 84 of Mail/Message/Field/Structured.pm only nukes whitespace if it
comes after a semicolon; thus, the until($string eq '') is never satisfied
and the parse() method loops infinitely.

I've fixed it locally by changing line 83 to:

  until($string =~ /^\s*$/)

This solves the symptom, but maybe you would be better off with a
consumeWhitespace() method for completeness.

On Sun, Oct 17, 2004 at 03:05:46AM -0700, Anthony D. Urso wrote:
> I am still using perl 5.8.0 (it seems like anytime I upgrade anything,
> things break in strange ways).  It is running on a Linux 2.4.24 box.
> Mail/Box.pm states it is v2.057.
> 
> I've attached a tarball with both files.
> 
> On Sun, Oct 17, 2004 at 09:31:40AM +0200, Mark Overmeer wrote:
> > * Anthony D. Urso ([email protected]) [041016 08:02]:
> > > Mail::Message::Head::study to hang at the 
> > >   return map {$_->study} $self->get(@_)
> > > 
> > > The symptoms feel like a busy loop.  Calling get() on the same header does
> > > not cause the hang.
> > 
> > There are no busy-loops in MailBox.  Anyway: I cannot reproduce your
> > problem with perl 5.8.1 or 5.8.5 and the latest MailBox release.  Not
> > with the C-parser and not with the Perl-parser.
> > 
> > Could you be more clear about the enviroment you are using?  Can you
> > send me the attachments as tar or zip archive, because your example
> > may have got mutulated during transport.
> > -- 
> >                MarkOv
> > 
> > ------------------------------------------------------------------------
> > drs Mark A.C.J. Overmeer                                MARKOV Solutions
> >        [email protected]                          [email protected]
> > http://Mark.Overmeer.net                   http://solutions.overmeer.net
> > 
> 
> -- 
>  Au
> 
>  PGP Key ID: 0x385B44CB
>  Fingerprint: 9E9E B116 DB2C D734 C090  E72F 43A0 95C4 385B 44CB
>     "Maximus vero fugiens a quodam Urso, milite Romano, interemptus est"
>                                                - Getica 235


-- 
 Au

 PGP Key ID: 0x385B44CB
 Fingerprint: 9E9E B116 DB2C D734 C090  E72F 43A0 95C4 385B 44CB
    "Maximus vero fugiens a quodam Urso, milite Romano, interemptus est"
                                               - Getica 235