[Libreoffice-commits] core.git: svx/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue May 25 18:51:52 UTC 2021


 svx/source/svdraw/svdobj.cxx |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 0eecca25109472586ae0380f9290bec7503460e6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue May 25 15:53:10 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue May 25 20:51:13 2021 +0200

    ofz#34601 teardown crash under oss-fuzz
    
    Change-Id: Icbb1500a85f956c8100878d6a0bef30b98440c32
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116114
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index df38cf4a6d7a..15b9cc6dcfcf 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -579,9 +579,14 @@ SdrItemPool& SdrObject::GetGlobalDrawObjectItemPool()
         mpGlobalItemPool->SetSecondaryPool(pGlobalOutlPool.get());
         mpGlobalItemPool->SetDefaultMetric(SdrEngineDefaults::GetMapUnit());
         mpGlobalItemPool->FreezeIdRanges();
-        uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(comphelper::getProcessComponentContext());
-        uno::Reference< frame::XTerminateListener > xListener( new TerminateListener );
-        xDesktop->addTerminateListener( xListener );
+        if (utl::ConfigManager::IsFuzzing())
+            mpGlobalItemPool->acquire();
+        else
+        {
+            uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(comphelper::getProcessComponentContext());
+            uno::Reference< frame::XTerminateListener > xListener( new TerminateListener );
+            xDesktop->addTerminateListener( xListener );
+        }
     }
 
     return *mpGlobalItemPool;


More information about the Libreoffice-commits mailing list