New Defects reported by Coverity Scan for LibreOffice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.

9 new defect(s) introduced to LibreOffice found with Coverity Scan.
19 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 9 of 9 defect(s)


** CID 1465260:  Error handling issues  (CHECKED_RETURN)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 79 in svx::sidebar::InspectorTextPanel::updateEntries(const std::vector<svx::sidebar::TreeNode, std::allocator<svx::sidebar::TreeNode>> &)()


________________________________________________________________________________________________________
*** CID 1465260:  Error handling issues  (CHECKED_RETURN)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 79 in svx::sidebar::InspectorTextPanel::updateEntries(const std::vector<svx::sidebar::TreeNode, std::allocator<svx::sidebar::TreeNode>> &)()
73         pTreeDiagram->all_foreach([pTreeDiagram](weld::TreeIter& rEntry) {
74             pTreeDiagram->expand_row(rEntry);
75             return false;
76         });
77     
78         std::unique_ptr<weld::TreeIter> xEntry = mxListBoxStyles->make_iterator();
>>>     CID 1465260:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "get_iter_first" without checking return value (as is done elsewhere 85 out of 91 times).
79         mxListBoxStyles->get_iter_first(*xEntry);
80         mxListBoxStyles->iter_next(*xEntry);
81         mxListBoxStyles->collapse_row(*xEntry); // Collapse "Default Paragraph Style"
82     }
83     
84     InspectorTextPanel::~InspectorTextPanel() { disposeOnce(); }

** CID 1465259:  API usage errors  (SWAPPED_ARGUMENTS)


________________________________________________________________________________________________________
*** CID 1465259:  API usage errors  (SWAPPED_ARGUMENTS)
/editeng/source/editeng/impedit.cxx: 150 in LOKSpecialPositioning::GetWindowPos(const tools::Rectangle &, MapUnit) const()
144         {
145             aRect = tools::Rectangle(aPos, aSz);
146         }
147         else
148         {
149             Point aNewPos(aPos.X() - aSz.Height(), aPos.Y());
>>>     CID 1465259:  API usage errors  (SWAPPED_ARGUMENTS)
>>>     The positions of arguments in the constructor for "Size" do not match the ordering of the parameters:
* "aSz.Height()" is passed to "nWidth"
* "aSz.Width()" is passed to "nHeight"
150             aRect = tools::Rectangle(aNewPos, Size(aSz.Height(), aSz.Width()));
151         }
152         return aRect;
153     }
154     
155     Point LOKSpecialPositioning::convertUnit(const Point& rPos, MapUnit ePosUnit) const

** CID 1465258:  Uninitialized members  (UNINIT_CTOR)
/svtools/source/brwbox/ebbcontrols.cxx: 391 in svt::EditControlBase::EditControlBase(BrowserDataWin *)()


________________________________________________________________________________________________________
*** CID 1465258:  Uninitialized members  (UNINIT_CTOR)
/svtools/source/brwbox/ebbcontrols.cxx: 391 in svt::EditControlBase::EditControlBase(BrowserDataWin *)()
385             m_pWidget = pWidget;
386         }
387     
388         EditControlBase::EditControlBase(BrowserDataWin* pParent)
389             : ControlBase(pParent, "svt/ui/thineditcontrol.ui", "EditControl") // *thin*editcontrol has no frame/border
390         {
>>>     CID 1465258:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "m_pEntry" is not initialized in this constructor nor in any functions that it calls.
391         }
392     
393         void EditControlBase::InitEditControlBase(weld::Entry* pEntry)
394         {
395             InitControlBase(pEntry);
396             m_pEntry = pEntry;

** CID 1465257:  Error handling issues  (CHECKED_RETURN)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 80 in svx::sidebar::InspectorTextPanel::updateEntries(const std::vector<svx::sidebar::TreeNode, std::allocator<svx::sidebar::TreeNode>> &)()


________________________________________________________________________________________________________
*** CID 1465257:  Error handling issues  (CHECKED_RETURN)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 80 in svx::sidebar::InspectorTextPanel::updateEntries(const std::vector<svx::sidebar::TreeNode, std::allocator<svx::sidebar::TreeNode>> &)()
74             pTreeDiagram->expand_row(rEntry);
75             return false;
76         });
77     
78         std::unique_ptr<weld::TreeIter> xEntry = mxListBoxStyles->make_iterator();
79         mxListBoxStyles->get_iter_first(*xEntry);
>>>     CID 1465257:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "iter_next" without checking return value (as is done elsewhere 77 out of 79 times).
80         mxListBoxStyles->iter_next(*xEntry);
81         mxListBoxStyles->collapse_row(*xEntry); // Collapse "Default Paragraph Style"
82     }
83     
84     InspectorTextPanel::~InspectorTextPanel() { disposeOnce(); }
85     

** CID 1465256:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/8/bits/list.tcc: 67 in std::__cxx11::_List_base<sc::DelayStartListeningFormulaCells, std::allocator<sc::DelayStartListeningFormulaCells>>::_M_clear()()


________________________________________________________________________________________________________
*** CID 1465256:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/8/bits/list.tcc: 67 in std::__cxx11::_List_base<sc::DelayStartListeningFormulaCells, std::allocator<sc::DelayStartListeningFormulaCells>>::_M_clear()()
61     _GLIBCXX_BEGIN_NAMESPACE_VERSION
62     _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
63     
64       template<typename _Tp, typename _Alloc>
65         void
66         _List_base<_Tp, _Alloc>::
>>>     CID 1465256:  Error handling issues  (UNCAUGHT_EXCEPT)
>>>     An exception of type "com::sun::star::uno::RuntimeException" is thrown but the throw list "noexcept" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
67         _M_clear() _GLIBCXX_NOEXCEPT
68         {
69           typedef _List_node<_Tp>  _Node;
70           __detail::_List_node_base* __cur = _M_impl._M_node._M_next;
71           while (__cur != &_M_impl._M_node)
72     	{

** CID 1465255:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1465255:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/uitest/uiobject.cxx: 264 in ScGridWinUIObject::execute(const rtl::OUString &, const std::map<const rtl::OUString, rtl::OUString, std::less<const rtl::OUString>, std::allocator<std::pair<const rtl::OUString, rtl::OUString>>> &)()
258                 pViewFunc->EditNote();
259             }
260             else if ( rParameters.find("CLOSE") != rParameters.end() )
261             {
262                 FuDraw* pDraw = dynamic_cast<FuDraw*> (getViewFunc()->GetDrawFuncPtr());
263                 ScViewData* pViewData = mxGridWindow->getViewData();
>>>     CID 1465255:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pDraw" to "GetSlotID", which dereferences it.
264                 pViewData->GetDispatcher().Execute( pDraw->GetSlotID() , SfxCallMode::SLOT | SfxCallMode::RECORD );
265             }
266             else if ( rParameters.find("SETTEXT") != rParameters.end() )
267             {
268                 auto itr = rParameters.find("SETTEXT");
269                 const OUString rStr = itr->second;

** CID 1465254:  Uninitialized members  (UNINIT_CTOR)
/svtools/source/brwbox/ebbcontrols.cxx: 354 in svt::ControlBase::ControlBase(BrowserDataWin *, const rtl::OUString &, const rtl::OString &)()


________________________________________________________________________________________________________
*** CID 1465254:  Uninitialized members  (UNINIT_CTOR)
/svtools/source/brwbox/ebbcontrols.cxx: 354 in svt::ControlBase::ControlBase(BrowserDataWin *, const rtl::OUString &, const rtl::OString &)()
348             m_aModifyHdl.Call(nullptr);
349         }
350     
351         ControlBase::ControlBase(BrowserDataWin* pParent, const OUString& rUIXMLDescription, const OString& rID)
352             : InterimItemWindow(pParent, rUIXMLDescription, rID)
353         {
>>>     CID 1465254:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "m_pWidget" is not initialized in this constructor nor in any functions that it calls.
354         }
355     
356         bool ControlBase::ControlHasFocus() const
357         {
358             if (!m_pWidget)
359                 return false;

** CID 1465253:  Error handling issues  (CHECKED_RETURN)
/svx/source/tbxctrls/verttexttbxctrl.cxx: 89 in SvxVertCTLTextTbxCtrl::initialize(const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &)()


________________________________________________________________________________________________________
*** CID 1465253:  Error handling issues  (CHECKED_RETURN)
/svx/source/tbxctrls/verttexttbxctrl.cxx: 89 in SvxVertCTLTextTbxCtrl::initialize(const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &)()
83             m_bVisible = m_pToolbar->get_item_visible(m_aCommandURL.toUtf8());
84             return;
85         }
86     
87         ToolBox* pToolBox = nullptr;
88         sal_uInt16 nItemId = 0;
>>>     CID 1465253:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "getToolboxId" without checking return value (as is done elsewhere 52 out of 55 times).
89         getToolboxId(nItemId, &pToolBox);
90         m_bVisible = pToolBox && pToolBox->IsItemVisible(nItemId);
91     }
92     
93     void SAL_CALL SvxVertCTLTextTbxCtrl::statusChanged(const css::frame::FeatureStateEvent& rEvent)
94     {

** CID 1465252:  Null pointer dereferences  (NULL_RETURNS)


________________________________________________________________________________________________________
*** CID 1465252:  Null pointer dereferences  (NULL_RETURNS)
/sc/source/ui/uitest/uiobject.cxx: 86 in ScGridWinUIObject::get_state()()
80         aMap["MarkedArea"] = aMarkedAreaString;
81     
82         ScDocument* pDoc = mxGridWindow->getViewData()->GetDocument();
83         ScAddress aPos( mxGridWindow->getViewData()->GetCurX() , mxGridWindow->getViewData()->GetCurY() , mxGridWindow->getViewData()->GetTabNo() );
84         if ( pDoc->HasNote( aPos ) )
85         {
>>>     CID 1465252:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "nullptr" "pDoc->GetNote(aPos)" when calling "GetText".
86             aMap["CurrentCellCommentText"] = pDoc->GetNote( aPos )->GetText();
87         }
88     
89         ScAppOptions aOpt = SC_MOD()->GetAppOptions();
90         aMap["Zoom"] = OUString::number( aOpt.GetZoom() );
91         return aMap;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D99Zx_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiE28Dl5h7LfJkIDfjhwO634bXr2DudJsag-2F1U0-2FJdsHkSCiPcd-2ByU7z424ptxaMQWUCQ-2BM8qk1NiqU5dSJyGtzmHC3I39YVEieF6JqXs-2BXCmYV9jztbN8nx-2B-2F-2BPEe75ykjhQhg20LM8Gbs3-2Fvrs4h59FIy89oNWnQAnNRaXTCfxEF-2FwM8oFSmq3Ix259bRldF

_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux