vcl/source/outdev/text.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit c0ca9ae5b1059d4ab584c7a4c74f7f233789c84c
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Jun 28 20:55:05 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Jun 28 22:57:15 2022 +0200

    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 <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

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;
     }
 

Reply via email to