summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-11 08:54:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-11 12:02:44 +0200
commita7a1fe1ce77677d069e289b0552860b342f1a505 (patch)
treeb9f7f61e4dd840d18f841fcb8f83eaf5c32bc49b /filter
parent7bd520428bf594d5edd217e58c8762f8d3648d04 (diff)
coverity#1434185 Operands don't affect result
Revert "ofz#7366 Integer overflow" This reverts commit 1f28de7e26cb9b12d74b743333dab72e08f53bec. Change-Id: I0117a29924d9f549ae19c5d802c83a2ee406b2a6 Reviewed-on: https://gerrit.libreoffice.org/52710 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/ios2met/ios2met.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 9b0a772ee1c0..1c1a077355e5 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -2037,16 +2037,10 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
sal_uInt16 nLen=nOrderLen;
auto nWidth = ReadCoord(bCoord32);
auto nHeight = ReadCoord(bCoord32);
- if (nWidth < 0 || nHeight < 0 ||
- nWidth > std::numeric_limits<decltype(nWidth)>::max() ||
- nHeight > std::numeric_limits<decltype(nHeight)>::max())
- {
+ if (nWidth < 0 || nHeight < 0)
aAttr.aChrCellSize = aDefAttr.aChrCellSize;
- }
else
- {
aAttr.aChrCellSize = Size(nWidth, nHeight);
- }
if (bCoord32) nLen-=8; else nLen-=4;
if (nLen>=4) {
pOS2MET->SeekRel(4); nLen-=4;