vcl/source/gdi/TypeSerializer.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 020e26dcdcbc9d95076350a61190fb9d3a9e3844
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Mar 13 12:02:06 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Mar 13 20:07:05 2022 +0100

    ofz#45528 we assert on using a negative y-scale so don't import one
    
    Change-Id: I3726a1b7164e4784c8e7954c7230745fa89ec2fd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131501
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/gdi/TypeSerializer.cxx 
b/vcl/source/gdi/TypeSerializer.cxx
index 3a7eb6859e22..03d6f6ec90e9 100644
--- a/vcl/source/gdi/TypeSerializer.cxx
+++ b/vcl/source/gdi/TypeSerializer.cxx
@@ -443,7 +443,8 @@ void TypeSerializer::readMapMode(MapMode& rMapMode)
 
     const bool bBogus = !aScaleX.IsValid() || !aScaleY.IsValid()
                         || aScaleX.GetNumerator() == 
std::numeric_limits<sal_Int32>::min()
-                        || aScaleY.GetNumerator() == 
std::numeric_limits<sal_Int32>::min();
+                        || aScaleY.GetNumerator() == 
std::numeric_limits<sal_Int32>::min()
+                        || static_cast<double>(aScaleY) < 0.0;
     SAL_WARN_IF(bBogus, "vcl", "invalid scale");
 
     if (bSimple || bBogus)

Reply via email to