diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-04-02 11:41:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-04-02 15:36:32 +0200 |
commit | e5b11989438f7292cf8042f2c7da4d607735386e (patch) | |
tree | 55525f1f629c1ebd611414a13902bdf8cc73411d /sw | |
parent | f98ada6c79384e580c1a97cf818ff8970c9eaded (diff) |
ofz#7285 Integer overflow
Change-Id: I56f642013ba8d1047067d69251f8a60bd768ee2e
Reviewed-on: https://gerrit.libreoffice.org/52254
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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; |