summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-27 13:34:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-27 17:18:11 +0200
commitac31598662c280ef99f305f6ca8ddc0be96ede06 (patch)
tree01d881ab32597d4ada9de34117957c7295047038 /filter
parent38e5169db360245daa9b9499589609cd80723f94 (diff)
ofz#3837 Integer-overflow
Change-Id: Iaf9573ba7a8c08ba8c1b8dcf62340d0ea213e1a9 Reviewed-on: https://gerrit.libreoffice.org/43944 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 'filter')
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 4d6001cd9538..6d5c41cba7d8 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -766,7 +766,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
bFail = o3tl::checked_sub(nNumb[2], nNumb[0], nWidth) || o3tl::checked_add(nWidth, 1L, nWidth);
if (!bFail)
bFail = o3tl::checked_sub(nNumb[3], nNumb[1], nHeight) || o3tl::checked_add(nWidth, 1L, nHeight);
- if (!bFail)
+ if (!bFail && nWidth > 0 && nHeight > 0)
{
GDIMetaFile aMtf;