summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-03-21 15:33:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-03-21 17:35:37 +0100
commitf4474b2967f9c7b3b82239c6e9c66850964c6e8b (patch)
treee99d6724ebb93015ced117e7c134a2028c5b9b47 /vcl
parent79b5ff92b17fde902c2f9db3e806f1c77a387dff (diff)
ofz#45878 add a way to set some limit on hugely complex clips
Change-Id: I6bbf7c6068560e3bb656560fb5c6cc2ed72cecd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131907 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/region.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 5293aa52328b..1f947f9b68fc 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -989,12 +989,15 @@ void vcl::Region::Intersect( const vcl::Region& rRegion )
return;
}
+ static size_t gPointLimit = !utl::ConfigManager::IsFuzzing() ? SAL_MAX_SIZE : SAL_MAX_INT16;
+ size_t nPointLimit(gPointLimit);
const basegfx::B2DPolyPolygon aClip(
basegfx::utils::clipPolyPolygonOnPolyPolygon(
aOtherPolyPoly,
aThisPolyPoly,
true,
- false));
+ false,
+ &nPointLimit));
*this = vcl::Region( aClip );
return;
}