diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-02-01 20:46:44 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-02-02 08:48:19 +0100 |
commit | 28570ba820fb1d5ef30d3f7d3420f6c8136dba56 (patch) | |
tree | 9ca599135148b0b460f962226a2fd9858c24d317 /filter | |
parent | 4aac7bc92ab91dadab6ad0bd3324494fbaa84625 (diff) |
ofz#12812 tiff Timeout
Change-Id: I5a9ccea6509760cd8a98087b5b3ea4b347947b0f
Reviewed-on: https://gerrit.libreoffice.org/67261
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 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 4e121351530d..85dc9d297265 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -21,6 +21,7 @@ #include <sal/config.h> #include <sal/log.hxx> +#include <unotools/configmgr.hxx> #include <vcl/FilterConfigItem.hxx> #include <vcl/graph.hxx> #include <vcl/BitmapTools.hxx> @@ -1593,6 +1594,13 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic ) } } + if (bStatus) + { + sal_Int32 nResult = 0; + if (utl::ConfigManager::IsFuzzing() && (o3tl::checked_multiply(nImageWidth, nImageLength, nResult) || nResult > 4000000)) + bStatus = false; + } + if ( bStatus ) { maBitmapPixelSize = Size(nImageWidth, nImageLength); |