[Libreoffice-commits] core.git: filter/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 5 13:18:07 UTC 2019
filter/source/graphicfilter/itiff/itiff.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit dd2b43c8a3c7cc5b7f057f26c0f43978b9e31f68
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 4 17:27:37 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 5 15:17:07 2019 +0200
ofz#16306 avoid timeout
Change-Id: I668b590d7abf466b90a1123ef9c8b9fed1a907ed
Reviewed-on: https://gerrit.libreoffice.org/80251
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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;
More information about the Libreoffice-commits
mailing list