diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-12-11 20:45:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-12-11 23:11:08 +0000 |
commit | eba5cfe961d3b6e429ee88d452001e689268f3ff (patch) | |
tree | 76fd6eb9c5cea42655776abb080fdb7e8bce1969 /vcl | |
parent | c6fcdc2a4a354f284ddb5f000572e2146a706715 (diff) |
ofz#54221 Out-of-memory
Change-Id: I4b4da37dfa0a961f77bc3bccdf2d25321f7d2447
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143951
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 7bd74f0a4830..878eb3e1ac99 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -266,6 +266,12 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG return; } + if (nWidth > 4024) + { + SAL_WARN("vcl", "rendering text would use > 2G Memory: " << nWidth); + return; + } + if (__lsan_disable) __lsan_disable(); #endif |