Kaydet (Commit) 5090d575 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#5909 Null-dereference READ

Change-Id: I830d3e8bda517e7681cea7481c32457486ced693
Reviewed-on: https://gerrit.libreoffice.org/49218Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2029a593
<table><td><a class="sdfootnoteanc"href=" sdfootnote1 "></a><div id="sdfootnote1"><table><td>
\ No newline at end of file
...@@ -2296,6 +2296,12 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, ...@@ -2296,6 +2296,12 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
break; break;
} }
if (!m_pSwTable)
{
SAL_WARN("sw.html", "no table");
return;
}
// get the table format and adapt it // get the table format and adapt it
SwFrameFormat *pFrameFormat = m_pSwTable->GetFrameFormat(); SwFrameFormat *pFrameFormat = m_pSwTable->GetFrameFormat();
pFrameFormat->SetFormatAttr( SwFormatHoriOrient(0, eHoriOri) ); pFrameFormat->SetFormatAttr( SwFormatHoriOrient(0, eHoriOri) );
...@@ -5196,8 +5202,9 @@ std::shared_ptr<HTMLTable> SwHTMLParser::BuildTable(SvxAdjust eParentAdjust, ...@@ -5196,8 +5202,9 @@ std::shared_ptr<HTMLTable> SwHTMLParser::BuildTable(SvxAdjust eParentAdjust,
m_bUpperSpace = true; m_bUpperSpace = true;
SetTextCollAttrs(); SetTextCollAttrs();
m_nParaCnt = m_nParaCnt - std::min(m_nParaCnt, SwTableNode* pTableNode = pTCntxt->GetTableNode();
pTCntxt->GetTableNode()->GetTable().GetTabSortBoxes().size()); size_t nTableBoxSize = pTableNode ? pTableNode->GetTable().GetTabSortBoxes().size() : 0;
m_nParaCnt = m_nParaCnt - std::min(m_nParaCnt, nTableBoxSize);
// Jump to a table if needed // Jump to a table if needed
if( JUMPTO_TABLE == m_eJumpTo && m_xTable->GetSwTable() && if( JUMPTO_TABLE == m_eJumpTo && m_xTable->GetSwTable() &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment