summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-14 20:25:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-14 20:25:31 +0000
commitf172d5ee4813e94c5c7f678a636985d0f76e872a (patch)
treec75e0d8c5da97996784618edb9a997dd5ebb4ffe /lotuswordpro
parent7dbea5f8ab421c8b31316aed6cff67ddb35dcb43 (diff)
ofz#5302 Integer-overflow
Change-Id: I837a795385e900099ad781a7d5a7be1985f379fe
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpparastyle.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx
index 651de9b73d13..9ebf5e7b3303 100644
--- a/lotuswordpro/source/filter/lwpparastyle.cxx
+++ b/lotuswordpro/source/filter/lwpparastyle.cxx
@@ -453,9 +453,9 @@ void LwpParaStyle::ApplyIndent(LwpPara* pPara, XFParaStyle* pParaStyle, LwpInden
sal_Int32 Amount = pParentIndent->GetMAll();
if (relative == LwpIndentOverride::RELATIVE_FIRST)
- Amount += pParentIndent->GetMFirst();
+ Amount = o3tl::saturating_add(Amount, pParentIndent->GetMFirst());
else if (relative == LwpIndentOverride::RELATIVE_REST)
- Amount += pParentIndent->GetMRest();
+ Amount = o3tl::saturating_add(Amount, pParentIndent->GetMRest());
pTotalIndent->SetMAll(o3tl::saturating_add(Amount, pTotalIndent->GetMAll()));
pTotalIndent->SetMRight(o3tl::saturating_add(pParentIndent->GetMRight(), pTotalIndent->GetMRight()));