diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-10-04 17:27:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-05 15:17:07 +0200 |
commit | dd2b43c8a3c7cc5b7f057f26c0f43978b9e31f68 (patch) | |
tree | 09b2a474256179f21a18bcd183bce71d42d489e7 /filter | |
parent | simplify SfxAllEnumItem (diff) | |
download | core-dd2b43c8a3c7cc5b7f057f26c0f43978b9e31f68.tar.gz core-dd2b43c8a3c7cc5b7f057f26c0f43978b9e31f68.zip |
ofz#16306 avoid timeout
Change-Id: I668b590d7abf466b90a1123ef9c8b9fed1a907ed
Reviewed-on: https://gerrit.libreoffice.org/80251
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/itiff/itiff.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 31f91c10eb3e..0d1bf7ae059d 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -1508,7 +1508,10 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic ) if ( bStatus ) { sal_uInt64 nRowSize = (static_cast<sal_uInt64>(nImageWidth) * nSamplesPerPixel / nPlanes * nBitsPerSample + 7) >> 3; - if (nRowSize > SAL_MAX_INT32 / SAL_N_ELEMENTS(aMap)) + auto nMaxSize = SAL_MAX_INT32 / SAL_N_ELEMENTS(aMap); + if (utl::ConfigManager::IsFuzzing()) + nMaxSize /= 2; + if (nRowSize > nMaxSize) { SAL_WARN("filter.tiff", "Ludicrous row size of: " << nRowSize << " required"); bStatus = false; |