diff options
Diffstat (limited to 'vcl/source/filter/graphicfilter.cxx')
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 072c1c31e5c8..cad4d4ae1fd5 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1439,7 +1439,7 @@ void GraphicFilter::ImportGraphics(std::vector< std::shared_ptr<Graphic> >& rGra } } -Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream) +Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 sizeLimit) { Graphic aGraphic; sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW; @@ -1454,7 +1454,7 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream) ErrCode nStatus = ImpTestOrFindFormat("", rIStream, nFormat); rIStream.Seek(nStreamBegin); - const sal_uInt32 nStreamLength(rIStream.Seek(STREAM_SEEK_TO_END) - nStreamBegin); + const sal_uInt32 nStreamLength( sizeLimit ? sizeLimit : rIStream.Seek(STREAM_SEEK_TO_END) - nStreamBegin); OUString aFilterName = pConfig->GetImportFilterName(nFormat); OUString aExternalFilterName = pConfig->GetExternalFilterName(nFormat, false); |