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

New commits:
commit 5b7b26fcb0fc53602a71b98b32095962b9ca1d46
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Dec 6 19:38:24 2025 +0000
Commit:     Xisco Fauli <[email protected]>
CommitDate: Wed Dec 10 14:20:23 2025 +0100

    ofz#466583689 cairo doesn't really handle outside +- 1 << 23
    
    Change-Id: I7d20a29f66ce905eed51657d8f2bff1ab75f826b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195175
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit 06daa4af3d8618a3cbb04d95a93d754621cdb194)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195299
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 765a3be4b768..75ebd34a1ba0 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -226,7 +226,8 @@ static bool AllowDim(tools::Long nDim)
     static bool bFuzzing = comphelper::IsFuzzing();
     if (bFuzzing)
     {
-        if (nDim > 0x20000000 || nDim < -0x20000000)
+        constexpr auto numCairoMax(1 << 23);
+        if (nDim > numCairoMax || nDim < -numCairoMax)
         {
             SAL_WARN("vcl", "skipping huge dimension: " << nDim);
             return false;

Reply via email to