summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-05-04 09:16:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-05-04 12:56:41 +0200
commitea59e9d9917421469b4c09c5ff41cf369c29939c (patch)
tree32ddec8ce6f2550c2dbd970df09de2ae684be02b
parente24daee6fd26da9de993128674bdb10d2fbc6cd1 (diff)
ofz#47199 Abort
Change-Id: I5e18242b3a18f0c9ca1891ab4e29bd43aaab1f26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133811 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/text/TextLayoutCache.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/text/TextLayoutCache.cxx b/vcl/source/text/TextLayoutCache.cxx
index 7cbc7c4dc744..1d3e8e5045a6 100644
--- a/vcl/source/text/TextLayoutCache.cxx
+++ b/vcl/source/text/TextLayoutCache.cxx
@@ -23,6 +23,7 @@
#include <o3tl/hash_combine.hxx>
#include <o3tl/lru_map.hxx>
+#include <unotools/configmgr.hxx>
#include <vcl/lazydelete.hxx>
#include <officecfg/Office/Common.hxx>
@@ -55,7 +56,9 @@ std::shared_ptr<const TextLayoutCache> TextLayoutCache::Create(OUString const& r
FastStringCompareEqual, TextLayoutCacheCost>
Cache;
static vcl::DeleteOnDeinit<Cache> cache(
- officecfg::Office::Common::Cache::Font::TextRunsCacheSize::get());
+ !utl::ConfigManager::IsFuzzing()
+ ? officecfg::Office::Common::Cache::Font::TextRunsCacheSize::get()
+ : 100);
if (Cache* map = cache.get())
{
auto it = map->find(rString);