Kaydet (Commit) 09f0194a authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#2980 timeout

Change-Id: Id54a6ef74059885728c1dffec10d67c9f56ba684
Reviewed-on: https://gerrit.libreoffice.org/42797Tested-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 b642999b
......@@ -493,14 +493,16 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj const * pTextObj,
* stream then contains the PICF and the corresponding graphic!
* We otherwise map the variable pDataStream to pStream.
*/
sal_uLong nOldPos = m_pDataStream->Tell();
auto nOldPos = m_pDataStream->Tell();
WW8_PIC aPic;
m_pDataStream->Seek( m_nPicLocFc );
PicRead( m_pDataStream, &aPic, m_bVer67);
bool bValid = checkSeek(*m_pDataStream, m_nPicLocFc);
if (bValid)
PicRead( m_pDataStream, &aPic, m_bVer67);
// Sanity check is needed because for example check boxes in field results
// contain a WMF-like struct
if (m_pDataStream->good() && (aPic.lcb >= 58))
if (bValid && m_pDataStream->good() && (aPic.lcb >= 58))
{
if( m_pFlyFormatOfJustInsertedGraphic )
{
......
......@@ -1894,7 +1894,9 @@ sal_Int32 WW8ScannerBase::WW8ReadString( SvStream& rStrm, OUString& rStr,
if( !bPosOk )
break;
rStrm.Seek( fcAct );
bool bValid = checkSeek(rStrm, fcAct);
if (!bValid)
break;
long nLen = ( (nNextPieceCp < nBehindTextCp) ? nNextPieceCp
: nBehindTextCp ) - nAktStartCp;
......
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