Subject: | "substr outside of string" with Fujifilm FinePix S1000fd images |
Some (not all) Fujifilm FinePix S1000fd images make Image::TIFF crash
with a "substr outside of string" error.
Attached you'll find a patch, as well as some tests on two images
downloaded from Flickr
(http://www.flickr.com/photos/broric85/2908363966/ and
http://www.flickr.com/photos/brendanrice/3142774192/)
--
B10m
Subject: | fuji_s1000fd.patch |
--- /Users/mblom/perl/5.10/lib/Image/TIFF.pm 2009-09-09 09:45:50.000000000 +0200
+++ lib/Image/TIFF.pm 2009-09-09 11:24:29.000000000 +0200
@@ -9,7 +9,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = '1.06';
+$VERSION = '1.06_01';
my @types = (
[ "BYTE", "C1", 1],
@@ -970,7 +970,7 @@
#print STDERR "# Decoding Makernotes from $maker\n";
$self->{tag_prefix} = $tag_prefix;
- if ($ifd_off == -1) {
+ if ($ifd_off == -1 && length($val) >= 12) {
# fuji kludge - http://www.butaman.ne.jp/~tsuruzoh/Computer/Digicams/exif-e.html#APP4
my $save_endian = $self->{little_endian};
$self->{little_endian} = 1;
Subject: | Image-Info-tests.tar.gz |
Message body not shown because it is not plain text.