[Libreoffice-commits] core.git: lotuswordpro/source

Caolán McNamara caolanm at redhat.com
Sun Jan 14 20:26:32 UTC 2018


 lotuswordpro/source/filter/lwpparastyle.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f172d5ee4813e94c5c7f678a636985d0f76e872a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Jan 14 20:25:31 2018 +0000

    ofz#5302 Integer-overflow
    
    Change-Id: I837a795385e900099ad781a7d5a7be1985f379fe

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()));
 


More information about the Libreoffice-commits mailing list