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

ofz#14469 null deref

since...

commit af84fc9d
Date:   Tue Apr 23 15:48:41 2019 +0200

    lazy image loading shouldn't read the entire .xls file (tdf#124828)

nLength is just an unchecked value in the dff stream, it might not be sane
so limit it to the max len of the stream

Change-Id: Ia8a2830478952afe1317b5cd795f35059d9b380a
Reviewed-on: https://gerrit.libreoffice.org/71412
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 571c233d
...@@ -1442,7 +1442,9 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 size ...@@ -1442,7 +1442,9 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 size
ErrCode nStatus = ImpTestOrFindFormat("", rIStream, nFormat); ErrCode nStatus = ImpTestOrFindFormat("", rIStream, nFormat);
rIStream.Seek(nStreamBegin); rIStream.Seek(nStreamBegin);
const sal_uInt32 nStreamLength( sizeLimit ? sizeLimit : rIStream.remainingSize()); sal_uInt32 nStreamLength(rIStream.remainingSize());
if (sizeLimit && sizeLimit < nStreamLength)
nStreamLength = sizeLimit;
OUString aFilterName = pConfig->GetImportFilterName(nFormat); OUString aFilterName = pConfig->GetImportFilterName(nFormat);
OUString aExternalFilterName = pConfig->GetExternalFilterName(nFormat, false); OUString aExternalFilterName = pConfig->GetExternalFilterName(nFormat, false);
......
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