New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Tue Dec 3 23:47:50 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.
4 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 1636563:  Error handling issues  (CHECKED_RETURN)
/basctl/source/basicide/moduldlg.cxx: 984 in basctl::createModImpl(weld::Window *, const basctl::ScriptDocument &, basctl::SbTreeListBox &, const rtl::OUString &, const rtl::OUString &, bool)()


________________________________________________________________________________________________________
*** CID 1636563:  Error handling issues  (CHECKED_RETURN)
/basctl/source/basicide/moduldlg.cxx: 984 in basctl::createModImpl(weld::Window *, const basctl::ScriptDocument &, basctl::SbTreeListBox &, const rtl::OUString &, const rtl::OUString &, bool)()
978             try
979             {
980                 OUString sModuleCode;
981                 // the module has existed
982                 if( rDocument.hasModule( aLibName, aModName ) )
983                     return nullptr;
>>>     CID 1636563:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "createModule" without checking return value (as is done elsewhere 5 out of 6 times).
984                 rDocument.createModule( aLibName, aModName, bMain, sModuleCode );
985                 BasicManager* pBasMgr = rDocument.getBasicManager();
986                 StarBASIC* pBasic = pBasMgr? pBasMgr->GetLib( aLibName ) : nullptr;
987                 if ( pBasic )
988                     pModule = pBasic->FindModule( aModName );
989                 SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, SBX_TYPE_MODULE );

** CID 1636562:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/app/acctrl.cxx: 37 in ScAutoCalculateControl::ScAutoCalculateControl(unsigned short, unsigned short, StatusBar &)()


________________________________________________________________________________________________________
*** CID 1636562:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/app/acctrl.cxx: 37 in ScAutoCalculateControl::ScAutoCalculateControl(unsigned short, unsigned short, StatusBar &)()
31     SFX_IMPL_STATUSBAR_CONTROL(ScAutoCalculateControl, SfxBoolItem);
32     
33     ScAutoCalculateControl::ScAutoCalculateControl(sal_uInt16 _nSlotId, sal_uInt16 _nId,
34                                                    StatusBar& rStb)
35         : SfxStatusBarControl(_nSlotId, _nId, rStb)
36     {
>>>     CID 1636562:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "m_bIsActive" is not initialized in this constructor nor in any functions that it calls.
37     }
38     
39     ScAutoCalculateControl::~ScAutoCalculateControl() {}
40     
41     void ScAutoCalculateControl::StateChangedAtStatusBarControl(sal_uInt16, SfxItemState eState,
42                                                                 const SfxPoolItem* pState)

** CID 1636561:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1636561:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/layout/paintfrm.cxx: 4126 in SwFlyFrame::IsPaint(SdrObject *, const SwViewShell *)()
4120         assert(pObj);
4121     
4122         //Attribute dependent, don't paint for printer or Preview
4123         bool bPaint =  gProp.pSFlyOnlyDraw ||
4124                            static_cast<SwContact*>(pUserCall)->GetFormat()->GetPrint().GetValue();
4125         if ( !bPaint )
>>>     CID 1636561:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pSh" to "GetWin", which dereferences it.
4126             bPaint = pSh->GetWin() && !pSh->IsPreview();
4127     
4128         if ( bPaint )
4129         {
4130             //The paint may be prevented by the superior Flys.
4131             SwFrame *pAnch = nullptr;

** CID 1636560:  Error handling issues  (CHECKED_RETURN)
/cui/source/dialogs/MacroManagerDialog.cxx: 191 in ScriptContainersListBox::Remove(const weld::TreeIter *, bool)()


________________________________________________________________________________________________________
*** CID 1636560:  Error handling issues  (CHECKED_RETURN)
/cui/source/dialogs/MacroManagerDialog.cxx: 191 in ScriptContainersListBox::Remove(const weld::TreeIter *, bool)()
185     
186             // children must be removed from the tree in reverse order
187             std::unique_ptr<weld::TreeIter> xRemoveIter = m_xTreeView->make_iterator();
188             while (m_xTreeView->iter_compare(*xIter, *pEntryIter) != 0)
189             {
190                 m_xTreeView->copy_iterator(*xIter, *xRemoveIter);
>>>     CID 1636560:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "iter_previous" without checking return value (as is done elsewhere 4 out of 5 times).
191                 m_xTreeView->iter_previous(*xIter);
192                 ScriptContainerInfo* pScriptContainerInfo
193                     = weld::fromId<ScriptContainerInfo*>(m_xTreeView->get_id(*xRemoveIter));
194                 if (pScriptContainerInfo)
195                 {
196                     if (pScriptContainerInfo->pBrowseNode)


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DtUM4_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtqHD-2BGNvr2StwZl8ArgXkw-2F0Xe5rQLO4mFXLeeRrfsx-2F5lsd9u6xwIpMLTEWW4MCrWKrBUcTyTgoy-2Fidua1zwpKjDVCyQF9G3Nn4Xu9sOyaA5OQWaksxORCahd6YmX1m-2B3aC4ncotcUoYZVeWpwmyUBWtKPEwblLTJlD-2B8goaTdg-3D



More information about the LibreOffice mailing list