sw/source/filter/html/htmltab.cxx | 2 ++ sw/source/filter/html/swhtml.cxx | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-)
New commits: commit b06ef4699e486368840bf0f7457debbe7f985ab0 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Dec 9 19:37:36 2017 +0000 ofz: crash on null pTableNd Change-Id: I9396afb40d75ee2463005a4501233dde1683f556 Reviewed-on: https://gerrit.libreoffice.org/46165 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index b8518a497f17..8f7dccdeb8ee 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -2715,6 +2715,8 @@ const SwStartNode *SwHTMLParser::InsertTableSection( sal_uInt16 nPoolId ) else { SwTableNode *pTableNd = pNd->FindTableNode(); + if (!pTableNd) + throw std::runtime_error("missing table"); if( pTableNd->GetTable().GetHTMLTableLayout() ) { // if there is already a HTMTableLayout, this table is already finished // and we have to look for the right table in the environment diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index bd4b8edb7878..1ddf9f741270 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -5533,7 +5533,14 @@ bool TestImportHTML(SvStream &rStream) SwPaM aPaM( aIdx ); aPaM.GetPoint()->nContent.Assign(aIdx.GetNode().GetContentNode(), 0); pD->SetInReading(true); - bool bRet = xReader->Read(*pD, OUString(), aPaM, OUString()) == ERRCODE_NONE; + bool bRet = false; + try + { + bRet = xReader->Read(*pD, OUString(), aPaM, OUString()) == ERRCODE_NONE; + } + catch (const std::runtime_error&) + { + } pD->SetInReading(false); return bRet;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits