diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-06-28 20:55:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-06-28 22:57:15 +0200 |
commit | c0ca9ae5b1059d4ab584c7a4c74f7f233789c84c (patch) | |
tree | dd2c871bd047290724702df229c1a6ab9a3887db /vcl/source/outdev | |
parent | b86c7136fe0f75813dd370b408a7096f78ff168b (diff) |
crashtesting: crash seen on exporting tdf117501-3.docx to odt
where the "font stretch" is sufficient to trigger the FreetypeFont ctor
mfStretch limit check to create an invalid font and we end up in
this failure case, which might have been missed at commit
commit 894b4911ffb96ff667fdeb3aec7922316ab7230a
Date: Thu Oct 28 09:27:29 2021 +0200
pass DX array around using o3tl::span instead of pointer
so we get bounds checking in debug mode
Change-Id: I63d0ccf37ab42954735043c6bf028d3c01616a89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136590
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r-- | vcl/source/outdev/text.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 0a1c1baf2162..e82d89930b6d 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -978,7 +978,10 @@ tools::Long OutputDevice::GetTextArray( const OUString& rStr, std::vector<sal_In // element init in the happy case will still be found by tools, // and hope that is sufficient. if (pDXAry) + { + pDXAry->resize(nLen); std::fill(pDXAry->begin(), pDXAry->end(), 0); + } return 0; } |