summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-02 16:12:04 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-02 22:29:11 +0100
commit8fbd4a5f6850ed94169f50617dc97c5fb054504b (patch)
tree5a2c28cd4d7c294be33c7f915121d30bf63927d4 /emfio
parent7a52e06ea062549d385270b368d549c92fbad841 (diff)
ofz#40625 avoid Integer-overflow
not much else can be done as far as I can see except to saturate Change-Id: Ifb7e47b03c76eca26b7340b047032e971401e86b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124619 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/emfreader.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index 632dca430a98..83754ace1f2d 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -1976,7 +1976,7 @@ namespace emfio
{
sal_Int32 nDxTmp = 0;
mpInputStream->ReadInt32(nDxTmp);
- aDXAry[i] += nDxTmp;
+ aDXAry[i] = o3tl::saturating_add(aDXAry[i], nDxTmp);
if (nOptions & ETO_PDY)
{
sal_Int32 nDyTmp = 0;