summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-26 10:50:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-26 19:21:22 +0200
commit334cc99139f59fffba214c821707c35270a6b0ee (patch)
tree2ced86df520381cbd36bde8d2fab6b65665f40f7
parentd97f0ceb437af5d05e9be220968033a2e5ed7001 (diff)
ofz#3820 Integer-overflow
Change-Id: I620b0278273e285100fe44d252389e6393a2022c Reviewed-on: https://gerrit.libreoffice.org/43877 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 27ccf4bac5db..65414afe6a82 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -97,10 +97,10 @@ static long ImplGetNumber(sal_uInt8* &rBuf, sal_uInt32& nSecurityCount)
nSecurityCount = 1; // error parsing the bounding box values
else if ( bValid )
{
- const bool bFail = o3tl::checked_multiply(nRetValue, 10L, nRetValue);
+ const bool bFail = o3tl::checked_multiply<long>(nRetValue, 10, nRetValue) ||
+ o3tl::checked_add<long>(nRetValue, *rBuf - '0', nRetValue);
if (bFail)
return 0;
- nRetValue += *rBuf - '0';
}
break;
}