From f172d5ee4813e94c5c7f678a636985d0f76e872a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 14 Jan 2018 20:25:31 +0000 Subject: ofz#5302 Integer-overflow Change-Id: I837a795385e900099ad781a7d5a7be1985f379fe --- lotuswordpro/source/filter/lwpparastyle.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lotuswordpro') 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())); -- cgit