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

avoid endless loop with busted wmf

Change-Id: I104de360f2e861e959ad2dad434a768440877f6f
üst 5b2f8231
......@@ -1394,9 +1394,13 @@ void WMFReader::ReadWMF()
}
}
}
nPos += nRecSize * 2;
if ( nPos <= nEndPos )
pWMF->Seek( nPos );
const sal_uInt32 nAvailableBytes = nEndPos - nPos;
const sal_uInt32 nMaxPossibleRecordSize = nAvailableBytes/2;
if (nRecSize <= nMaxPossibleRecordSize)
{
nPos += nRecSize * 2;
pWMF->Seek(nPos);
}
else
pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR );
}
......
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