diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-01-28 21:37:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-01-29 09:53:54 +0100 |
commit | eb70426c1fdf021f2688f179988a8c36b673c67b (patch) | |
tree | b70fdb1fab1c653bf5e81ec28421a4ee1db0c314 /filter | |
parent | cb50e64a858e6791f9893699be0ec5fe4a259834 (diff) |
ofz#11104 for timeouts, limit decompression ratios when fuzzing
Change-Id: If9efe56a40a866269a06ce944885a324495af48a
Reviewed-on: https://gerrit.libreoffice.org/67036
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 8f8edd243be2..4e121351530d 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -547,8 +547,8 @@ sal_uInt8* TIFFReader::getMapData(sal_uInt32 np) bool TIFFReader::ReadMap() { - //when fuzzing with a max len set, max decompress to 2000 times that limit - static size_t nMaxAllowedDecompression = [](const char* pEnv) { size_t nRet = pEnv ? std::atoi(pEnv) : 0; return nRet * 2000; }(std::getenv("FUZZ_MAX_INPUT_LEN")); + //when fuzzing with a max len set, max decompress to 250 times that limit + static size_t nMaxAllowedDecompression = [](const char* pEnv) { size_t nRet = pEnv ? std::atoi(pEnv) : 0; return nRet * 250; }(std::getenv("FUZZ_MAX_INPUT_LEN")); size_t nTotalDataRead = 0; if ( nCompression == 1 || nCompression == 32771 ) |