New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Sat Sep 14 11:04:24 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.
10 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 1619417:  API usage errors  (SWAPPED_ARGUMENTS)


________________________________________________________________________________________________________
*** CID 1619417:  API usage errors  (SWAPPED_ARGUMENTS)
/sw/source/core/doc/docruby.cxx: 224 in SwDoc::SetRubyList(SwPaM &, const std::vector<std::unique_ptr<SwRubyListEntry, std::default_delete<SwRubyListEntry>>, std::allocator<std::unique_ptr<SwRubyListEntry, std::default_delete<SwRubyListEntry>>>> &)()
218                 nTotalContentGrowth += pEntry->GetText().getLength();
219             }
220         }
221     
222         // Expand selection to account for insertion
223         rPam.Normalize();
>>>     CID 1619417:  API usage errors  (SWAPPED_ARGUMENTS)
>>>     The positions of arguments in the constructor for "SwPaM" do not match the ordering of the parameters:
* "aOrigPam.GetPoint()" is passed to "rMark".
* "rPam->GetMark()" is passed to "rPoint".
224         rPam = SwPaM{ *aOrigPam.GetPoint(), *rPam.GetMark() };
225         if (*rPam.GetPoint() == *rPam.GetMark())
226         {
227             rPam.GetPoint()->AdjustContent(-nTotalContentGrowth);
228         }
229     

** CID 1619416:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4408 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 2)]::lambda([lambda(bool) (instance 2)]&&)()


________________________________________________________________________________________________________
*** CID 1619416:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4408 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 2)]::lambda([lambda(bool) (instance 2)]&&)()
4402                 // note: the storage passed here must be independent from the
4403                 // xWriteableZipStor because a writable storage can't have 2
4404                 // instances of sub-storage for the same directory open, but with
4405                 // independent storages it somehow works
4406                 xModelSigner->SignScriptingContentAsync(
4407                     GetScriptingStorageToSign_Impl(), xStream,
>>>     CID 1619416:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor nor in any functions that it calls.
4408                     [this, xSigner, xMetaInf, xWriteableZipStor,
4409                      onSignDocumentContentFinished](bool bRet) {
4410                     // remove the document signature if any
4411                     OUString aDocSigName = xSigner->getDocumentContentSignatureDefaultStreamName();
4412                     if ( !aDocSigName.isEmpty() && xMetaInf->hasByName( aDocSigName ) )
4413                         xMetaInf->removeElement( aDocSigName );

** CID 1619415:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4408 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 2)]::lambda(const [lambda(bool) (instance 2)]&)()


________________________________________________________________________________________________________
*** CID 1619415:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/doc/docfile.cxx: 4408 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 2)]::lambda(const [lambda(bool) (instance 2)]&)()
4402                 // note: the storage passed here must be independent from the
4403                 // xWriteableZipStor because a writable storage can't have 2
4404                 // instances of sub-storage for the same directory open, but with
4405                 // independent storages it somehow works
4406                 xModelSigner->SignScriptingContentAsync(
4407                     GetScriptingStorageToSign_Impl(), xStream,
>>>     CID 1619415:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "this" is not initialized in this constructor nor in any functions that it calls.
4408                     [this, xSigner, xMetaInf, xWriteableZipStor,
4409                      onSignDocumentContentFinished](bool bRet) {
4410                     // remove the document signature if any
4411                     OUString aDocSigName = xSigner->getDocumentContentSignatureDefaultStreamName();
4412                     if ( !aDocSigName.isEmpty() && xMetaInf->hasByName( aDocSigName ) )
4413                         xMetaInf->removeElement( aDocSigName );


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DVg4v_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtOyrA7-2F8LQ7XPDZsPEUZpK3Z0Vh8nHF34v0ikbSrCRm6hUWZJAs1fKxPVv8atVu5-2BKYW8cIBsLuqKTgSZkKrJ72iUUlB97tHZokxQqpiWkoQkxjbH8jQkHkThdg0MD2uV7E0NN54CIxBYO8f-2B0OrulBtn1NeYc4EJLr-2BbS7UGwmQ-3D



More information about the LibreOffice mailing list