diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-05-06 19:28:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-05-06 22:00:49 +0200 |
commit | 31a95393e69dbf1b200e323d25182c8b381ddce8 (patch) | |
tree | 67a73ec80aa0a0f670aef66d32a444cf484972f5 /vcl | |
parent | 7ef7bf9304414488ed7ceec71bb9c2400ebb99b8 (diff) |
cid#1529287 Explicit null dereferenced
after
commit c55d5586304f23f9d8acbaffefba68a3a11c6175
Date: Sat Apr 1 16:10:33 2023 +0100
BinaryDataContainer: hand out shared_ptr's to SvStreams.
and
commit 0f2581204a70038ed7ca78089a9bd96d158e02c0
Date: Mon Apr 3 09:34:54 2023 +0100
BinaryDataContainer swap out implementation.
it is possible that a eLinkType of GfxLinkType::NativeGif and a
nStreamLength of 0 could lead to BinaryDataContainer::getAsStream
being called on a default ctored BinaryDataContainer which would
mean an mpImpl of null and a null dereference here
Change-Id: Id964e3ce97e5527c5357576131fe03440f1ea00c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151453
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index e51b027be701..2cbe95e50194 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -912,7 +912,7 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 size { bool bAnimated = false; Size aLogicSize; - if (eLinkType == GfxLinkType::NativeGif) + if (eLinkType == GfxLinkType::NativeGif && !aGraphicContent.isEmpty()) { std::shared_ptr<SvStream> pMemoryStream = aGraphicContent.getAsStream(); bAnimated = IsGIFAnimated(*pMemoryStream, aLogicSize); |