summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-05 14:59:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-05 20:22:17 +0100
commitcef6271497ad3fe74820b36d6387351b15a16519 (patch)
treeba35cb1d420972c9b9206662f9cfbc663e214fd9 /lotuswordpro
parentcadfee0a72cf032314833959f7b7f3f6688a3079 (diff)
ofz#4976 Integer-overflow
Change-Id: I6929fc192e0e602c06edf89cf70e256797f7543a Reviewed-on: https://gerrit.libreoffice.org/47476 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpparastyle.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx
index b51d24b22251..b0d19ecc8b06 100644
--- a/lotuswordpro/source/filter/lwpparastyle.cxx
+++ b/lotuswordpro/source/filter/lwpparastyle.cxx
@@ -68,6 +68,7 @@
#include "lwpnumberingoverride.hxx"
#include "lwptaboverride.hxx"
#include "lwpbackgroundoverride.hxx"
+#include <o3tl/safeint.hxx>
#include <xfilter/xfdefs.hxx>
#include <xfilter/xfparastyle.hxx>
#include <xfilter/xfborders.hxx>
@@ -455,7 +456,7 @@ void LwpParaStyle::ApplyIndent(LwpPara* pPara, XFParaStyle* pParaStyle, LwpInden
Amount += pParentIndent->GetMFirst();
else if (relative == LwpIndentOverride::RELATIVE_REST)
Amount += pParentIndent->GetMRest();
- pTotalIndent->SetMAll(Amount + pTotalIndent->GetMAll());
+ pTotalIndent->SetMAll(o3tl::saturating_add(Amount, pTotalIndent->GetMAll()));
pTotalIndent->SetMRight(pParentIndent->GetMRight()+ pTotalIndent->GetMRight());
pParaStyle->SetIndent(pTotalIndent->GetFirst());