summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-11 10:23:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-06-11 12:47:38 +0200
commit79260c7cd80107f223e0f9bcf4bd91ae40566cbe (patch)
tree8bc54b6423a3d03f8da1c1db477b948906c0a884 /emfio
parent54344deb66b2aca47bfcc9cadcbc0262fc4c138b (diff)
ofz#35150 crash in Bitmap::Crop from wmf load
which is a problem since... commit 33d2cf7008de79106b5da4bba0241aa14d81d88f Date: Sat Jun 5 19:30:46 2021 +0200 WMF Change the sign of read fields in BITBLT and DIB records Change-Id: Iea1261a52866d691435f0612f672636009c00355 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117039 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/wmfreader.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index f506de102bfe..93908503d9bf 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -832,7 +832,7 @@ namespace emfio
break;
}
const vcl::PixelFormat ePixelFormat = vcl::bitDepthToPixelFormat( nBitCount );
- bool bOk = nWidth && nHeight && nBytesPerScan > 0 && nPlanes == 1 && ePixelFormat != vcl::PixelFormat::INVALID;
+ bool bOk = nWidth > 0 && nHeight > 0 && nBytesPerScan > 0 && nPlanes == 1 && ePixelFormat != vcl::PixelFormat::INVALID;
if (bOk)
{
// must be enough data to fulfil the request