diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-05-09 12:10:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-05-09 16:07:01 +0200 |
commit | 10f3cb6aa8794d063ae5990066fcfa006d47c512 (patch) | |
tree | 5a7c279205777e3cb10831ca415a03fa7eec851b | |
parent | 7d0b19f3ea3932c9c9bd73604987373681440a1c (diff) |
ofz#46070 Out-of-memory
Change-Id: Ie7417f5f7e0ed49cfc3b38eda3117d53c8a2a59e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134053
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/headless/CairoCommon.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx index 7cf2951b9da6..2e2dcaecec6f 100644 --- a/vcl/headless/CairoCommon.cxx +++ b/vcl/headless/CairoCommon.cxx @@ -26,6 +26,7 @@ #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> +#include <unotools/configmgr.hxx> #include <sal/log.hxx> #include <osl/module.h> @@ -313,9 +314,11 @@ SystemDependentData_CairoPath::SystemDependentData_CairoPath( , mbNoJoin(bNoJoin) , mbAntiAlias(bAntiAlias) { + static const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + // tdf#129845 only create a copy of the path when nSizeMeasure is // bigger than some decent threshold - if (nSizeMeasure > 50) + if (!bFuzzing && nSizeMeasure > 50) { mpCairoPath = cairo_copy_path(cr); |