Skip Menu |
 

This queue is for tickets about the Image-Size CPAN distribution.

Report information
The Basics
Id: 41238
Status: open
Priority: 0/
Queue: Image-Size

People
Owner: rjray [...] blackperl.com
Requestors: bgp4 [...] rambler.ru
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Image::Size die on truncated file
Download (untitled) / with headers
text/plain 171b
Image::Size die on truncated file: 'x' outside of string in unpack at lib/Image/Size.pm It seems to be unpcak bug, because it should not die, but it die. Patch attached.
Subject: patch-Image-Size.pm
Download patch-Image-Size.pm
text/x-perl 528b
--- Image/Size.pm.orig 2008-11-26 14:53:47.000000000 +0300 +++ Image/Size.pm 2008-11-26 15:10:34.000000000 +0300 @@ -949,7 +949,10 @@ { # Segments that contain size info $length = 5; - ($y, $x) = unpack("xnn", &$read_in($stream, $length)); + my $buf = &$read_in($stream, $length); + # unpack die on truncated data + last if length($buf) < $length; + ($y, $x) = unpack("xnn", $buf); $id = 'JPG'; last; }
Download (untitled) / with headers
text/plain 474b
On Wed Nov 26 07:25:24 2008, http://id.rambler.ru/users/bgp4/ wrote: Show quoted text
> Image::Size die on truncated file: > 'x' outside of string in unpack at lib/Image/Size.pm > > It seems to be unpcak bug, because it should not die, but it die. > > Patch attached.
Language in http://cpansearch.perl.org/src/RJRAY/Image-Size-3.300/ChangeLog seems to indicate that this bug has been resolved. Has it? If so, then I would recommend closing this ticket? Thank you very much. Jim Keenan


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.