New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Sun Aug 10 16:37:12 UTC 2025


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.
24 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 1662135:       Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)


_____________________________________________________________________________________________
*** CID 1662135:         Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/vcl/source/treelist/transfer.cxx: 1615             in TransferableDataHelper::GetBitmapEx(const com::sun::star::datatransfer::DataFlavor &, Bitmap &) const()
1609                 // explicitly use Bitmap::Read with bFileHeader = sal_True
1610                 // #i124085# keep DIBV5 for read from clipboard, but should not happen
1611                 ReadDIBV5(aBitmap, aMask, *xStm);
1612     
1613                 if(aMask.GetBitmap().IsEmpty())
1614                 {
>>>     CID 1662135:         Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "aBitmap" is copied in call to copy assignment for class "Bitmap", when it could be moved instead.
1615                     rBmp = aBitmap;
1616                 }
1617                 else
1618                 {
1619                     rBmp = Bitmap(BitmapEx(aBitmap, aMask));
1620                 }

** CID 1662134:       Uninitialized members  (UNINIT_CTOR)
/sdext/source/pdfimport/inc/genericelements.hxx: 177           in pdfi::GroupElement::GroupElement(pdfi::Element *, int)()


_____________________________________________________________________________________________
*** CID 1662134:         Uninitialized members  (UNINIT_CTOR)
/sdext/source/pdfimport/inc/genericelements.hxx: 177             in pdfi::GroupElement::GroupElement(pdfi::Element *, int)()
171         };
172     
173         struct GroupElement final : public DrawElement
174         {
175             friend class ElementFactory;
176             GroupElement( Element* pParent, sal_Int32 nGCId )
>>>     CID 1662134:         Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "isForSoftMask" is not initialized in this constructor nor in any functions that it calls.
177             : DrawElement( pParent, nGCId ) {}
178     
179         public:
180             virtual void visitedBy( ElementTreeVisitor&, const std::list< std::unique_ptr<Element> >::const_iterator& ) override;
181             bool isTransparencyGroup;
182             bool isForSoftMask;

** CID 1662133:       Error handling issues  (CHECKED_RETURN)
/vcl/source/gdi/embeddedfontshelper.cxx: 54           in <unnamed>::GetEmbeddedFontsRoot()::[lambda() (instance 1)]::operator ()() const()


_____________________________________________________________________________________________
*** CID 1662133:         Error handling issues  (CHECKED_RETURN)
/vcl/source/gdi/embeddedfontshelper.cxx: 54             in <unnamed>::GetEmbeddedFontsRoot()::[lambda() (instance 1)]::operator ()() const()
48     const OUString& GetEmbeddedFontsRoot()
49     {
50         static const OUString path = []()
51         {
52             OUString p = u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") "::UserInstallation}"_ustr;
53             rtl::Bootstrap::expandMacros(p);
>>>     CID 1662133:         Error handling issues  (CHECKED_RETURN)
>>>     Calling "getAbsoluteFileURL" without checking return value (as is done elsewhere 20 out of 21 times).
54             osl::FileBase::getAbsoluteFileURL({}, p + "/user/temp/embeddedfonts/", p);
55             return p;
56         }();
57         return path;
58     }
59     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/libreoffice?tab=overview

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20250810/788f6640/attachment.htm>


More information about the LibreOffice mailing list