diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-11 10:23:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-06-11 12:47:38 +0200 |
commit | 79260c7cd80107f223e0f9bcf4bd91ae40566cbe (patch) | |
tree | 8bc54b6423a3d03f8da1c1db477b948906c0a884 | |
parent | 54344deb66b2aca47bfcc9cadcbc0262fc4c138b (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>
-rw-r--r-- | emfio/source/reader/wmfreader.cxx | 2 | ||||
-rw-r--r-- | vcl/qa/cppunit/graphicfilter/data/wmf/fail/ofz35150-1.wmf | bin | 0 -> 74 bytes |
2 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 diff --git a/vcl/qa/cppunit/graphicfilter/data/wmf/fail/ofz35150-1.wmf b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/ofz35150-1.wmf Binary files differnew file mode 100644 index 000000000000..2d156198194c --- /dev/null +++ b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/ofz35150-1.wmf |