Kaydet (Commit) aff9057c authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) David Tardon

another avoid endless loop with busted wmf

Change-Id: Ie4068fdc1e54e0ad3e55354938a4c5e1459e7fe0
(cherry picked from commit 7ffe6aeb)
Reviewed-on: https://gerrit.libreoffice.org/17682Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst a0623449
......@@ -637,14 +637,15 @@ bool EnhWMFReader::ReadEnhWMF()
break;
}
nNextPos = pWMF->Tell() + ( nRecSize - 8 );
if ( !pWMF->good() || nNextPos > nEndPos )
const sal_uInt32 nMaxPossibleRecSize = nEndPos - pWMF->Tell() + 8;
if (nRecSize > nMaxPossibleRecSize)
{
bStatus = false;
break;
}
nNextPos = pWMF->Tell() + ( nRecSize - 8 );
if( !aBmpSaveList.empty()
&& ( nRecType != EMR_STRETCHBLT )
&& ( nRecType != EMR_STRETCHDIBITS )
......
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