New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Tue Sep 10 17:18:27 UTC 2024


Hi,

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

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


** CID 1619295:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4341 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, const std::function<void (bool)> &, const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const rtl::OUString &)::[lambda(bool) (instance 1)]::lambda(const [lambda(bool) (instance 1)]&)()


________________________________________________________________________________________________________
*** CID 1619295:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4341 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, const std::function<void (bool)> &, const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const rtl::OUString &)::[lambda(bool) (instance 1)]::lambda(const [lambda(bool) (instance 1)]&)()
4335         uno::Reference< embed::XStorage > xWriteableZipStor;
4336     
4337         // we can reuse the temporary file if there is one already
4338         CreateTempFile( false );
4339         GetMedium_Impl();
4340     
>>>     CID 1619295:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor nor in any functions that it calls.
4341         auto onSignDocumentContentFinished = [this, rCallback](bool bRet) {
4342             CloseAndRelease();
4343     
4344             ResetError();
4345     
4346             rCallback(bRet);

** CID 1619294:  Null pointer dereferences  (NULL_RETURNS)


________________________________________________________________________________________________________
*** CID 1619294:  Null pointer dereferences  (NULL_RETURNS)
/svx/source/gallery2/galbrws1.cxx: 292 in GalleryBrowser1::ImplGalleryThemeProperties(std::basic_string_view<char16_t, std::char_traits<char16_t>>, bool)()
286     void GalleryBrowser1::ImplGalleryThemeProperties( std::u16string_view rThemeName, bool bCreateNew )
287     {
288         DBG_ASSERT(!mpThemePropsDlgItemSet, "mpThemePropsDlgItemSet already set!");
289         mpThemePropsDlgItemSet.reset(new SfxItemSet( SfxGetpApp()->GetPool() ));
290         GalleryTheme*   pTheme = mpGallery->AcquireTheme( rThemeName, maLocalListener );
291     
>>>     CID 1619294:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "nullptr" "pTheme" when calling "ImplFillExchangeData".
292         ImplFillExchangeData( pTheme, *mpExchangeData );
293     
294         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
295         VclPtr<VclAbstractDialog> xThemePropertiesDialog = pFact->CreateGalleryThemePropertiesDialog(mxThemes.get(), mpExchangeData.get(), mpThemePropsDlgItemSet.get());
296     
297         if ( bCreateNew )

** CID 1619293:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4486 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, const std::function<void (bool)> &, const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const rtl::OUString &)::[lambda() (instance 2)]::lambda(const [lambda() (instance 2)]&)()


________________________________________________________________________________________________________
*** CID 1619293:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4486 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, const std::function<void (bool)> &, const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const rtl::OUString &)::[lambda() (instance 2)]::lambda(const [lambda() (instance 2)]&)()
4480                 }
4481                 else if (xWriteableZipStor.is())
4482                 {
4483                     // OOXML.
4484                     uno::Reference<io::XStream> xStream;
4485     
>>>     CID 1619293:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor nor in any functions that it calls.
4486                     auto onOOXMLSignDocumentContentFinished = [this, xWriteableZipStor]() {
4487                         uno::Reference<embed::XTransactedObject> xTransact(xWriteableZipStor, uno::UNO_QUERY_THROW);
4488                         xTransact->commit();
4489     
4490                         // the temporary file has been written, commit it to the original file
4491                         Commit();

** CID 1619292:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4447 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, const std::function<void (bool)> &, const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const rtl::OUString &)::[lambda() (instance 1)]::lambda([lambda() (instance 1)]&&)()


________________________________________________________________________________________________________
*** CID 1619292:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4447 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, const std::function<void (bool)> &, const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const rtl::OUString &)::[lambda() (instance 1)]::lambda([lambda() (instance 1)]&&)()
4441                     // ODF.
4442                     uno::Reference< io::XStream > xStream;
4443                     if (GetFilter() && GetFilter()->IsOwnFormat())
4444                         xStream.set(xMetaInf->openStreamElement(xSigner->getDocumentContentSignatureDefaultStreamName(), embed::ElementModes::READWRITE), uno::UNO_SET_THROW);
4445     
4446                     bool bSuccess = false;
>>>     CID 1619292:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor nor in any functions that it calls.
4447                     auto onODFSignDocumentContentFinished = [this, xMetaInf, xWriteableZipStor]() {
4448                         uno::Reference< embed::XTransactedObject > xTransact( xMetaInf, uno::UNO_QUERY_THROW );
4449                         xTransact->commit();
4450                         xTransact.set( xWriteableZipStor, uno::UNO_QUERY_THROW );
4451                         xTransact->commit();
4452     

** CID 1619291:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4486 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, const std::function<void (bool)> &, const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const rtl::OUString &)::[lambda() (instance 2)]::lambda([lambda() (instance 2)]&&)()


________________________________________________________________________________________________________
*** CID 1619291:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4486 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, const std::function<void (bool)> &, const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const rtl::OUString &)::[lambda() (instance 2)]::lambda([lambda() (instance 2)]&&)()
4480                 }
4481                 else if (xWriteableZipStor.is())
4482                 {
4483                     // OOXML.
4484                     uno::Reference<io::XStream> xStream;
4485     
>>>     CID 1619291:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor nor in any functions that it calls.
4486                     auto onOOXMLSignDocumentContentFinished = [this, xWriteableZipStor]() {
4487                         uno::Reference<embed::XTransactedObject> xTransact(xWriteableZipStor, uno::UNO_QUERY_THROW);
4488                         xTransact->commit();
4489     
4490                         // the temporary file has been written, commit it to the original file
4491                         Commit();

** CID 1619290:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4447 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, const std::function<void (bool)> &, const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const rtl::OUString &)::[lambda() (instance 1)]::lambda(const [lambda() (instance 1)]&)()


________________________________________________________________________________________________________
*** CID 1619290:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4447 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, const std::function<void (bool)> &, const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const rtl::OUString &)::[lambda() (instance 1)]::lambda(const [lambda() (instance 1)]&)()
4441                     // ODF.
4442                     uno::Reference< io::XStream > xStream;
4443                     if (GetFilter() && GetFilter()->IsOwnFormat())
4444                         xStream.set(xMetaInf->openStreamElement(xSigner->getDocumentContentSignatureDefaultStreamName(), embed::ElementModes::READWRITE), uno::UNO_SET_THROW);
4445     
4446                     bool bSuccess = false;
>>>     CID 1619290:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor nor in any functions that it calls.
4447                     auto onODFSignDocumentContentFinished = [this, xMetaInf, xWriteableZipStor]() {
4448                         uno::Reference< embed::XTransactedObject > xTransact( xMetaInf, uno::UNO_QUERY_THROW );
4449                         xTransact->commit();
4450                         xTransact.set( xWriteableZipStor, uno::UNO_QUERY_THROW );
4451                         xTransact->commit();
4452     

** CID 1619289:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4341 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, const std::function<void (bool)> &, const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const rtl::OUString &)::[lambda(bool) (instance 1)]::lambda([lambda(bool) (instance 1)]&&)()


________________________________________________________________________________________________________
*** CID 1619289:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4341 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, const std::function<void (bool)> &, const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::security::XCertificate> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const com::sun::star::uno::Reference<com::sun::star::graphic::XGraphic> &, const rtl::OUString &)::[lambda(bool) (instance 1)]::lambda([lambda(bool) (instance 1)]&&)()
4335         uno::Reference< embed::XStorage > xWriteableZipStor;
4336     
4337         // we can reuse the temporary file if there is one already
4338         CreateTempFile( false );
4339         GetMedium_Impl();
4340     
>>>     CID 1619289:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor nor in any functions that it calls.
4341         auto onSignDocumentContentFinished = [this, rCallback](bool bRet) {
4342             CloseAndRelease();
4343     
4344             ResetError();
4345     
4346             rCallback(bRet);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DiGbJ_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtDH3mNWgwnNz1YxTtdUeCmYx6jnMRy9C3JgdZ0qSkR8o34-2FX-2B3kRNlr11G0DgkA0wqUw7zungHIVQKVDuBrbJyccgHznB5p7qoOPo95PdMkLVEs5V54h4ZaWba-2BilMgHLK3I6rj5EIHJanBzgxYs4ud8Ag6cbid4sEbs87WDRoV4-3D



More information about the LibreOffice mailing list