[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Mon Apr 2 13:36:53 UTC 2018
sw/source/filter/ww8/ww8graf.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit e5b11989438f7292cf8042f2c7da4d607735386e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 2 11:41:12 2018 +0100
ofz#7285 Integer overflow
Change-Id: I56f642013ba8d1047067d69251f8a60bd768ee2e
Reviewed-on: https://gerrit.libreoffice.org/52254
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index e66861a699b8..ebbe33bb390c 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2997,10 +2997,10 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj
SfxItemSet &rFlySet )
{
SwFlyFrameFormat* pRetFrameFormat = nullptr;
- long nWidthTw = pF->nXaRight - pF->nXaLeft;
+ sal_Int32 nWidthTw = o3tl::saturating_sub(pF->nXaRight, pF->nXaLeft);
if (0 > nWidthTw)
nWidthTw = 0;
- long nHeightTw = pF->nYaBottom - pF->nYaTop;
+ sal_Int32 nHeightTw = o3tl::saturating_sub(pF->nYaBottom, pF->nYaTop);
if (0 > nHeightTw)
nHeightTw = 0;
More information about the Libreoffice-commits
mailing list