summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
Diffstat (limited to 'filter')
-rw-r--r--filter/qa/cppunit/data/tiff/fail/crash-7.tiffbin0 -> 179 bytes
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx2
2 files changed, 2 insertions, 0 deletions
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 000000000000..0056f9dcb8d5
--- /dev/null
+++ b/filter/qa/cppunit/data/tiff/fail/crash-7.tiff
Binary files differ
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 180b1c379003..c730e81b38a6 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 )