Files
odfstudio/filter/source/graphicfilter
Stephan Bergmann 45ea6ebdf1 Avoid undefined floating -> integer conversion in TIFF import
...as started to happen when reading (invalid)
filter/qa/cppunit/data/tiff/fail/RC4-crash-7.tiff in
CppunitTest_filter_tiff_test after c81765629b
"coverity#1266496 Untrusted loop bound":

> /filter/source/graphicfilter/itiff/itiff.cxx:270:47: runtime error: value -nan is outside the range of representable values of type 'int'
>     #0 0x2b5bae7ad928 in TIFFReader::ReadIntData() /filter/source/graphicfilter/itiff/itiff.cxx:270:47
>     #1 0x2b5bae7b0017 in TIFFReader::ReadTagData(unsigned short, unsigned int) /filter/source/graphicfilter/itiff/itiff.cxx:320:27
>     #2 0x2b5bae7e80f3 in TIFFReader::ReadTIFF(SvStream&, Graphic&) /filter/source/graphicfilter/itiff/itiff.cxx:1377:21
[...]

With an error-reporting concept apparently missing here, just convert such out-
of-bounds values to zero.  (And make ReadDoubleData not go though the value-
limiting ReadIntData for floating types.)

Change-Id: I6e53e468e6b98fb7a7d5fd7f3336ee2168f76e30
Reviewed-on: https://gerrit.libreoffice.org/51700
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-21 14:18:44 +01:00
..
2018-03-20 13:08:20 +01:00
2018-03-20 13:08:20 +01:00
2018-03-20 13:08:20 +01:00
2018-03-14 07:23:10 +01:00