New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Mon Dec 9 16:29:56 UTC 2024
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
4 new defect(s) introduced to LibreOffice found with Coverity Scan.
3 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 4 of 4 defect(s)
** CID 1636670: Concurrent data access violations (MISSING_LOCK)
/basic/source/uno/namecont.cxx: 2638 in basic::SfxLibraryContainer::disposing(std::unique_lock<std::mutex> &)()
________________________________________________________________________________________________________
*** CID 1636670: Concurrent data access violations (MISSING_LOCK)
/basic/source/uno/namecont.cxx: 2638 in basic::SfxLibraryContainer::disposing(std::unique_lock<std::mutex> &)()
2632
2633 // OComponentHelper
2634 void SfxLibraryContainer::disposing(std::unique_lock<std::mutex>& guard)
2635 {
2636 Reference< XModel > xModel = mxOwnerDocument;
2637 EventObject aEvent( xModel );
>>> CID 1636670: Concurrent data access violations (MISSING_LOCK)
>>> Accessing "this->maVBAScriptListeners" without holding lock "comphelper::UnoImplBase.m_aMutex". Elsewhere, "basic::SfxLibraryContainer.maVBAScriptListeners" is written to with "UnoImplBase.m_aMutex" held 2 out of 2 times.
2638 maVBAScriptListeners.disposeAndClear(guard, aEvent);
2639 stopAllComponentListening();
2640 mxOwnerDocument.clear();
2641 }
2642
2643 // Methods XLibraryContainerPassword
** CID 1636669: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 1636669: Null pointer dereferences (FORWARD_NULL)
/sc/source/filter/xml/xmlexprt.cxx: 5286 in ScXMLExport::GetViewSettings(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &)()
5280 pProps[++i].Name = "VisibleAreaWidth";
5281 pProps[i].Value <<= static_cast<sal_Int32>(aRect.getOpenWidth());
5282 pProps[++i].Name = "VisibleAreaHeight";
5283 pProps[i].Value <<= static_cast<sal_Int32>(aRect.getOpenHeight());
5284 }
5285 }
>>> CID 1636669: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "pDocObj" to "GetDocument", which dereferences it.
5286 ScDocument* pDoc = pDocObj->GetDocument();
5287 if (!pDoc)
5288 {
5289 SAL_WARN("sc", "no ScDocument!");
5290 return;
5291 }
** CID 1636668: Uninitialized variables (UNINIT)
________________________________________________________________________________________________________
*** CID 1636668: Uninitialized variables (UNINIT)
/basic/source/uno/namecont.cxx: 2817 in basic::SfxLibraryContainer::addVBAScriptListener(const com::sun::star::uno::Reference<com::sun::star::script::vba::XVBAScriptListener> &)()
2811 return mnRunningVBAScripts;
2812 }
2813
2814 void SAL_CALL SfxLibraryContainer::addVBAScriptListener( const Reference< vba::XVBAScriptListener >& rxListener )
2815 {
2816 std::unique_lock guard(m_aMutex);
>>> CID 1636668: Uninitialized variables (UNINIT)
>>> Using uninitialized value "guard._M_owns" when calling "addInterface".
2817 maVBAScriptListeners.addInterface(guard, rxListener);
2818 }
2819
2820 void SAL_CALL SfxLibraryContainer::removeVBAScriptListener( const Reference< vba::XVBAScriptListener >& rxListener )
2821 {
2822 std::unique_lock guard(m_aMutex);
** CID 1636667: Uninitialized variables (UNINIT)
________________________________________________________________________________________________________
*** CID 1636667: Uninitialized variables (UNINIT)
/basic/source/uno/namecont.cxx: 2823 in basic::SfxLibraryContainer::removeVBAScriptListener(const com::sun::star::uno::Reference<com::sun::star::script::vba::XVBAScriptListener> &)()
2817 maVBAScriptListeners.addInterface(guard, rxListener);
2818 }
2819
2820 void SAL_CALL SfxLibraryContainer::removeVBAScriptListener( const Reference< vba::XVBAScriptListener >& rxListener )
2821 {
2822 std::unique_lock guard(m_aMutex);
>>> CID 1636667: Uninitialized variables (UNINIT)
>>> Using uninitialized value "guard._M_owns" when calling "removeInterface".
2823 maVBAScriptListeners.removeInterface(guard, rxListener);
2824 }
2825
2826 void SAL_CALL SfxLibraryContainer::broadcastVBAScriptEvent( sal_Int32 nIdentifier, const OUString& rModuleName )
2827 {
2828 // own lock for accessing the number of running scripts
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3Dtj5__A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtf1g4kzVfo-2BHShzPIlmmZvnfdBe3UM7kpBinPRW0plr-2BJjwbT6zU9wlnDaf9UzoJX2im-2BaKx2iXK-2FfToO4hTnigVnH6thywoYvkmkP2dsS1lpRRxoXtI4q5sVoJUEU4t5wfFxBmln6x7agaU4upzOef6rW0gq4FtBG5s96RDOG4M-3D
More information about the LibreOffice
mailing list