Subject: | Infinite loop of errors in Image::Info::TIFF |
Under certain circumstances, Image::Info::TIFF seems to go into an infinite loop of errors, though I haven't managed to track down where the loop is yet.
The cause is an incorrect self-call within process_ifds() at line 185 of Image/Info/TIFF.pm. Here is the context:
if ($tn eq "ExifOffset") {
# parse ExifSubIFD
&process_ifds($info,$fh,$byteorder,$offset);
}
My guess is it should be
&process_ifds($info,$fh,$page,$tagsseen,$byteorder,$offset);
The missing 3rd and 4th arguments result in $byteorder being undef in the inside call, which leads to this error:
Use of uninitialized value in string ne at /usr/local/lib/perl5/site_perl/5.8.0/Image/Info/TIFF.pm line 73.
Then, I think because the function is being called inside an eval which doesn't appear to check whether it succeeded or not, it just goes round again and again. Possibly some additional error checking in my own code could avoid that, but equally how could I guess that an unexpected error in Image::Info would fail to halt?
Ben