summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-12-08 11:42:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-12-08 13:57:37 +0000
commit00e5509f07e1e53d506fc824df32e38a266952b1 (patch)
treeb3f7416161c99c5ed39489d5627119f5fae5192f /vcl
parent3e1c606185dc8480a8e9a43e23a6596551570510 (diff)
ofz#53824 Out-of-memory
Change-Id: I348da7f237146dfa690b974dcabdf26369997eb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143816 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 3dbaa79cd1e5..7bd74f0a4830 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -260,6 +260,12 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG
}
#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
+ if (nHeight > 8120)
+ {
+ SAL_WARN("vcl", "rendering text would use > 2G Memory: " << nHeight);
+ return;
+ }
+
if (__lsan_disable)
__lsan_disable();
#endif