sw/source/filter/ww8/rtfattributeoutput.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 16c7ee1fb0eecba2b612731fbb1ceb510e16ea69
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Oct 3 21:19:39 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Oct 4 14:53:36 2022 +0200

    crashtesting: failure on export of ooo59560-1.sxw to rtf
    
    Change-Id: If65c5be203a877befacc0d710d98940b6504f593
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140904
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 4c3c2c5a74af..7645f89eb157 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -720,7 +720,13 @@ void RtfAttributeOutput::TableDefinition(
     // The cell-dependent properties
     const double fWidthRatio = m_pTableWrt->GetAbsWidthRatio();
     const SwWriteTableRows& aRows = m_pTableWrt->GetRows();
-    SwWriteTableRow* pRow = aRows[pTableTextNodeInfoInner->getRow()].get();
+    sal_uInt32 nRow = pTableTextNodeInfoInner->getRow();
+    if (nRow >= aRows.size())
+    {
+        SAL_WARN("sw.ww8", "RtfAttributeOutput::TableDefinition: out of range 
row: " << nRow);
+        return;
+    }
+    SwWriteTableRow* pRow = aRows[nRow].get();
     SwTwips nSz = 0;
 
     // Not using m_nTableDepth, which is not yet incremented here.

Reply via email to