[Libreoffice-commits] core.git: emfio/source vcl/qa

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 11 10:48:32 UTC 2021


 emfio/source/reader/wmfreader.cxx                         |    2 +-
 vcl/qa/cppunit/graphicfilter/data/wmf/fail/ofz35150-1.wmf |binary
 2 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 79260c7cd80107f223e0f9bcf4bd91ae40566cbe
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 11 10:23:29 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jun 11 12:47:38 2021 +0200

    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 at redhat.com>

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
new file mode 100644
index 000000000000..2d156198194c
Binary files /dev/null and b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/ofz35150-1.wmf differ


More information about the Libreoffice-commits mailing list