[Libreoffice-commits] core.git: filter/qa filter/source
Caolán McNamara
caolanm at redhat.com
Tue Jul 21 02:13:13 PDT 2015
filter/qa/cppunit/data/tiff/fail/crash-7.tiff |binary
filter/source/graphicfilter/itiff/itiff.cxx | 2 ++
2 files changed, 2 insertions(+)
New commits:
commit 34d062147c16090fa42c27ac7960e3f5e3b65d2b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jul 21 10:10:50 2015 +0100
reject invalid tiff dimensions
Change-Id: I64e77f12cb016a7f4a9d21c732aaeaae7959da76
diff --git a/filter/qa/cppunit/data/tiff/fail/crash-7.tiff b/filter/qa/cppunit/data/tiff/fail/crash-7.tiff
new file mode 100644
index 0000000..0056f9d
Binary files /dev/null and b/filter/qa/cppunit/data/tiff/fail/crash-7.tiff differ
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 180b1c3..c730e81 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1330,6 +1330,8 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
}
if ( !nBitsPerSample || ( nBitsPerSample > 32 ) )
bStatus = false;
+ if (nImageWidth < 0 || nImageLength < 0)
+ bStatus = false;
if ( bStatus )
{
if ( nMaxSampleValue == 0 )
More information about the Libreoffice-commits
mailing list