summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-15 20:53:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-16 00:25:03 +0200
commit9bb9be2ab19a959e5fd602a9a532317d3c086723 (patch)
treec64bde1edd9c802f9d555335fa0687471b887753 /filter
parentd4daf634cd9ce8d422d49669c324a2220eba54a9 (diff)
reduce eps fuzzer size
and ofz+ubsan warning Change-Id: I55db222dc73432171d9d0b8b8e41371963ccb955 Reviewed-on: https://gerrit.libreoffice.org/43412 Tested-by: Jenkins <ci@libreoffice.org> 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/ieps/ieps.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index b74f0805bab2..f2b138f550cd 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -36,6 +36,7 @@
#include <osl/file.hxx>
#include <osl/thread.h>
#include <o3tl/char16_t2wchar_t.hxx>
+#include <o3tl/safeint.hxx>
#include <memory>
class FilterConfigItem;
@@ -96,7 +97,9 @@ static long ImplGetNumber(sal_uInt8* &rBuf, sal_uInt32& nSecurityCount)
nSecurityCount = 1; // error parsing the bounding box values
else if ( bValid )
{
- nRetValue *= 10;
+ const bool bFail = o3tl::checked_multiply(nRetValue, 10L, nRetValue);
+ if (bFail)
+ return 0;
nRetValue += *rBuf - '0';
}
break;