Skip Menu |

This queue is for tickets about the Mail-Mbox-MessageParser CPAN distribution.

Report information
The Basics
Id: 69469
Status: resolved
Priority: 0/
Queue: Mail-Mbox-MessageParser

People
Owner: Nobody in particular
Requestors: VADZ [...] cpan.org
Cc:
AdminCc:

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



Subject: Division by zero when analysing non-MBOX files
It's pretty easy to get "Illegal division by zero at Mail/Mbox/MessageParser.pm line 640." error when trying to open a file that is not quite a valid MBOX. I don't attach an example because the file in question contains some private emails and without understanding this code it's not really clear how can I make a synthetic example showing it but it does seem that there should be a check for $data_length!=0 in this function, could it please be added?
I believe the root cause is an empty line at the start of the file. This is technically an invalid mbox format, but I'll support it in 1.5003.