From cef6271497ad3fe74820b36d6387351b15a16519 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 5 Jan 2018 14:59:49 +0000 Subject: ofz#4976 Integer-overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6929fc192e0e602c06edf89cf70e256797f7543a Reviewed-on: https://gerrit.libreoffice.org/47476 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- lotuswordpro/source/filter/lwpparastyle.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lotuswordpro') 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 #include #include #include @@ -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()); -- cgit