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

New commits:
commit 9929849f2d95fa83cbbd322169f8cf8756b30c75
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Mar 10 10:33:05 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Mar 10 15:36:08 2022 +0100

    ofz#45424 Integer-overflow
    
    Change-Id: I73efd2f099c6298f4532395c31e2214281c48dca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131309
    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 1d28b597a15d..3a7eb6859e22 100644
--- a/vcl/source/gdi/TypeSerializer.cxx
+++ b/vcl/source/gdi/TypeSerializer.cxx
@@ -441,7 +441,9 @@ void TypeSerializer::readMapMode(MapMode& rMapMode)
     readFraction(aScaleY);
     mrStream.ReadCharAsBool(bSimple);
 
-    const bool bBogus = !aScaleX.IsValid() || !aScaleY.IsValid();
+    const bool bBogus = !aScaleX.IsValid() || !aScaleY.IsValid()
+                        || aScaleX.GetNumerator() == 
std::numeric_limits<sal_Int32>::min()
+                        || aScaleY.GetNumerator() == 
std::numeric_limits<sal_Int32>::min();
     SAL_WARN_IF(bBogus, "vcl", "invalid scale");
 
     if (bSimple || bBogus)

Reply via email to