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

New commits:
commit 467c8bc2229f51ef4ca6d9593554a7cf1e7ff7ee
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Mar 18 16:55:37 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Mar 18 20:38:41 2022 +0100

    ofz#45583 Integer-overflow
    
    we assert on use of a negative xscale too, so don't allow that either
    
    Change-Id: I3420fc3f4568eed187fcccf26067006e064d417e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131835
    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 03d6f6ec90e9..fb054e4748ef 100644
--- a/vcl/source/gdi/TypeSerializer.cxx
+++ b/vcl/source/gdi/TypeSerializer.cxx
@@ -444,7 +444,7 @@ 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()
-                        || static_cast<double>(aScaleY) < 0.0;
+                        || static_cast<double>(aScaleX) < 0.0 || 
static_cast<double>(aScaleY) < 0.0;
     SAL_WARN_IF(bBogus, "vcl", "invalid scale");
 
     if (bSimple || bBogus)

Reply via email to