oox/source/ppt/slidepersist.cxx           |    2 ++
 sd/qa/unit/data/pptx/pass/ofz46160-1.pptx |binary
 2 files changed, 2 insertions(+)

New commits:
commit 254d0e17dcd9a6bce536057b020292ac0ab2e48e
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Mar 30 08:53:58 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Mar 30 12:19:50 2022 +0200

    ofz#46160 Null-dereference READ
    
    Change-Id: Id33a39a7a65849a4ca98b43a88e60d5a96eaf5de
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132297
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 061dda725551..e90f2365fefc 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -347,6 +347,8 @@ void SlidePersist::createConnectorShapeConnection()
     for (sal_Int32 i = 0; i < nConnectorShapeCount; i++)
     {
         const auto& pIt = maShapeMap.find(maConnectorShapeId[i]);
+        if (pIt == maShapeMap.end())
+            continue;
         oox::drawingml::ConnectorShapePropertiesList aConnectorShapeProperties
             = pIt->second->getConnectorShapeProperties();
         uno::Reference<drawing::XShape> xConnector(pIt->second->getXShape(), 
uno::UNO_QUERY);
diff --git a/sd/qa/unit/data/pptx/pass/ofz46160-1.pptx 
b/sd/qa/unit/data/pptx/pass/ofz46160-1.pptx
new file mode 100644
index 000000000000..721d1d87d8f0
Binary files /dev/null and b/sd/qa/unit/data/pptx/pass/ofz46160-1.pptx differ

Reply via email to