sw/source/filter/ww8/ww8graf2.cxx | 2 +- sw/source/filter/ww8/ww8par6.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit 09b72d9fda544ad48a50c991022d505dd347705a Author: Caolán McNamara <[email protected]> Date: Thu Apr 6 15:50:51 2017 +0100 eof is not an error, but we don't want to parse short read data Change-Id: I17043c51e45de34a33db482141e33eb4a280e9c4 diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index 1cc052ea1772..88fa9c7c000c 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -497,7 +497,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, // Sanity check is needed because for example check boxes in field results // contain a WMF-like struct - if (!m_pDataStream->GetError() && (aPic.lcb >= 58)) + if (m_pDataStream->good() && (aPic.lcb >= 58)) { if( m_pFlyFormatOfJustInsertedGraphic ) { commit dcf85b2f0c89a774a7b2d378ef4dcedc637887ad Author: Caolán McNamara <[email protected]> Date: Thu Apr 6 15:28:28 2017 +0100 valgrind: reverse tests of use read result and test result is safe to use Change-Id: Id5c70294ee49209061c4a1df95d06689d7f8383e diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index d0d332759d0f..1cc052ea1772 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -497,7 +497,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, // Sanity check is needed because for example check boxes in field results // contain a WMF-like struct - if ((aPic.lcb >= 58) && !m_pDataStream->GetError()) + if (!m_pDataStream->GetError() && (aPic.lcb >= 58)) { if( m_pFlyFormatOfJustInsertedGraphic ) { commit aeac0bcacb8f6efcedb79df90e68078483d5a68f Author: Caolán McNamara <[email protected]> Date: Thu Apr 6 15:12:10 2017 +0100 ofz: treat short properties as run end Change-Id: I00a5bab63663e2dde43825707e84568fca6aa594 diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 6c73cc054da5..538486ea91c4 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -3827,7 +3827,7 @@ void SwWW8ImplReader::Read_Language( sal_uInt16 nId, const sal_uInt8* pData, sho return; } - if( nLen < 0 ) // end of attribute + if (nLen < 2) // end of attribute m_pCtrlStck->SetAttr( *m_pPaM->GetPoint(), nId ); else {
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
