Hi.

I spent some time on this bug and so far I can tell that the infinit
loop is located at Mail/Mbox/MessageParser/Grep.pm, line 373. This is
code from the libmail-mbox-messageparser-perl package so this bug
might actually belong there.

my $length_to_read = 
$CACHE->{$self->{'file_name'}}{'emails'}[$self->{'CURRENT_EMAIL_INDEX'}]{'length'};
my $total_amount_read = 0;

do {
    $total_amount_read += read($self->{'file_handle'}, $self->{'READ_BUFFER'}, 
      $length_to_read-$total_amount_read, length($self->{'READ_BUFFER'}));
} while ($total_amount_read != $length_to_read);

The loop never terminates because the code doesn't check the return
value of read(), which is 0, which would mean EOF. The code assumes that
$length_to_read can never go behind the end of file so I guess it really
shouldn't do that ;)
Why this doesn't work correctly in this case I can't tell yet.

Gruesse,
-- 
Frank Lichtenheld <[EMAIL PROTECTED]>
www: http://www.djpig.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to