Kaydet (Commit) cef62714 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#4976 Integer-overflow

Change-Id: I6929fc192e0e602c06edf89cf70e256797f7543a
Reviewed-on: https://gerrit.libreoffice.org/47476Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst cadfee0a
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment