New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Thu Aug 15 18:48:51 UTC 2024


Hi,

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

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


** CID 1616499:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/drawinglayer/source/primitive2d/textlayoutdevice.cxx: 415 in drawinglayer::primitive2d::TextLayouterDevice::createEmphasisMarks(SalLayout &, drawinglayer::primitive2d::TextEmphasisMark, bool, std::function<void (const basegfx::B2DPoint &, const basegfx::B2DPolyPolygon &, bool, const tools::Rectangle &, const tools::Rectangle &)>) const()


________________________________________________________________________________________________________
*** CID 1616499:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/drawinglayer/source/primitive2d/textlayoutdevice.cxx: 415 in drawinglayer::primitive2d::TextLayouterDevice::createEmphasisMarks(SalLayout &, drawinglayer::primitive2d::TextEmphasisMark, bool, std::function<void (const basegfx::B2DPoint &, const basegfx::B2DPolyPolygon &, bool, const tools::Rectangle &, const tools::Rectangle &)>) const()
409         if (bAbove)
410             nEmphasisMark |= FontEmphasisMark::PosAbove;
411         else
412             nEmphasisMark |= FontEmphasisMark::PosBelow;
413     
414         mrDevice.createEmphasisMarks(nEmphasisMark, static_cast<tools::Long>(fEmphasisHeight),
>>>     CID 1616499:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "aCallback" is passed-by-value as parameter to "createEmphasisMarks" when it could be moved instead.
415                                      rSalLayout, aCallback);
416     }
417     
418     // helper methods for vcl font handling
419     
420     vcl::Font getVclFontFromFontAttribute(const attribute::FontAttribute& rFontAttribute,

** CID 1616498:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/comphelper/source/misc/lok.cxx: 323 in comphelper::LibreOfficeKit::setAnyInputCallback(std::function<bool (void *)>, void *)()


________________________________________________________________________________________________________
*** CID 1616498:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/comphelper/source/misc/lok.cxx: 323 in comphelper::LibreOfficeKit::setAnyInputCallback(std::function<bool (void *)>, void *)()
317         if (pStatusIndicatorCallback)
318             pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::Finish, 0, nullptr);
319     }
320     
321     void setAnyInputCallback(std::function<bool(void*)> pAnyInputCallback, void* pData)
322     {
>>>     CID 1616498:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pAnyInputCallback" is copied in a call to copy assignment "operator =", when it could be moved instead.
323         g_pAnyInputCallback = pAnyInputCallback;
324         g_pAnyInputCallbackData = pData;
325     }
326     
327     bool anyInput()
328     {

** CID 1613648:  Resource leaks  (CTOR_DTOR_LEAK)


________________________________________________________________________________________________________
*** CID 1613648:  Resource leaks  (CTOR_DTOR_LEAK)
/usr/include/c++/12/bits/hashtable.h: 568 in std::_Hashtable<rtl::OString, std::pair<const rtl::OString, writerfilter::rtftok::<unnamed>::RTFSymbol>, std::allocator<std::pair<const rtl::OString, writerfilter::rtftok::<unnamed>::RTFSymbol>>, std::__detail::_Select1st, std::equal_to<rtl::OString>, std::hash<rtl::OString>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<(bool)1, (bool)0, (bool)1>>::_Hashtable<const std::pair<const rtl::OString, writerfilter::rtftok::<unnamed>::RTFSymbol> *>(T1, T1, unsigned long, const std::hash<rtl::OString> &, const std::equal_to<rtl::OString> &, const std::allocator<std::pair<const rtl::OString, writerfilter::rtftok::<unnamed>::RTFSymbol>>&)()
562           template<typename _InputIterator>
563     	_Hashtable(_InputIterator __f, _InputIterator __l,
564     		   size_type __bkt_count_hint = 0,
565     		   const _Hash& __hf = _Hash(),
566     		   const key_equal& __eql = key_equal(),
567     		   const allocator_type& __a = allocator_type())
>>>     CID 1613648:  Resource leaks  (CTOR_DTOR_LEAK)
>>>     Calling allocation function "_Hashtable".
568     	: _Hashtable(__f, __l, __bkt_count_hint, __hf, __eql, __a,
569     		     __unique_keys{})
570     	{ }
571     
572           _Hashtable(initializer_list<value_type> __l,
573     		 size_type __bkt_count_hint = 0,


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DsaSs_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtQfSXgZlkkIU3big02c7mc4dh-2BTVgYIzjAYX-2Bjly6KpzjRKHWUg-2BglCkOO4nPrtKi1ihx3-2Ff4GrRWfzuuqNwaBE0bbXrbY2WotRgUdqikKBm5i0ZxA0I9GGiBSduhxM7cv5ViodKTSuCSgQFfQ3eSmLnVi98i9nAC2bVVFuRS86U-3D



More information about the LibreOffice mailing list