Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 14 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 14 of 14 defect(s) ** CID 1620328: Uninitialized members (UNINIT_CTOR) /sc/source/ui/unoobj/solveruno.cxx: 136 in ScSolverSettings::ScSolverSettings(ScDocShell *, com::sun::star::uno::Reference<com::sun::star::container::XNamed>)() ________________________________________________________________________________________________________ *** CID 1620328: Uninitialized members (UNINIT_CTOR) /sc/source/ui/unoobj/solveruno.cxx: 136 in ScSolverSettings::ScSolverSettings(ScDocShell *, com::sun::star::uno::Reference<com::sun::star::container::XNamed>)() 130 SCTAB nTab; 131 if (m_rDoc.GetTable(aName, nTab)) 132 { 133 m_pTable = m_rDoc.FetchTable(nTab); 134 m_pSettings = m_pTable->GetSolverSettings(); 135 } >>> CID 1620328: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "m_pTable" is not initialized in this constructor nor in any functions that it calls. 136 } 137 138 ScSolverSettings::~ScSolverSettings() {} 139 140 bool ScSolverSettings::ParseRef(ScRange& rRange, const OUString& rInput, bool bAllowRange) 141 { ** CID 1620327: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4414 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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 1620327: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4414 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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)]&)() 4408 // note: the storage passed here must be independent from the 4409 // xWriteableZipStor because a writable storage can't have 2 4410 // instances of sub-storage for the same directory open, but with 4411 // independent storages it somehow works 4412 xModelSigner->SignScriptingContentAsync( 4413 GetScriptingStorageToSign_Impl(), xStream, >>> CID 1620327: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "this" is not initialized in this constructor nor in any functions that it calls. 4414 [this, xSigner, xMetaInf, xWriteableZipStor, 4415 onSignDocumentContentFinished](bool bRet) { 4416 // remove the document signature if any 4417 OUString aDocSigName = xSigner->getDocumentContentSignatureDefaultStreamName(); 4418 if ( !aDocSigName.isEmpty() && xMetaInf->hasByName( aDocSigName ) ) 4419 xMetaInf->removeElement( aDocSigName ); ** CID 1620326: (UNINIT) ________________________________________________________________________________________________________ *** CID 1620326: (UNINIT) /sc/source/ui/unoobj/solveruno.cxx: 782 in ScSolverSettings::solve()() 776 } 777 else 778 { 779 // Test if the right side is a numeric value 780 sal_uInt32 nFormat; 781 double fValue(0); >>> CID 1620326: (UNINIT) >>> Using uninitialized value "nFormat" when calling "IsNumberFormat". 782 if (m_rDoc.GetFormatTable()->IsNumberFormat(rConstr.aRightStr, nFormat, fValue)) 783 aConstraint.Right <<= fValue; 784 else if (aConstraint.Operator != sheet::SolverConstraintOperator_INTEGER 785 && aConstraint.Operator != sheet::SolverConstraintOperator_BINARY) 786 { 787 m_nStatus = sheet::SolverStatus::PARSE_ERROR; /sc/source/ui/unoobj/solveruno.cxx: 839 in ScSolverSettings::solve()() 833 aRightRange.aStart.Tab(), aRightRange.aStart.Col(), aRightRange.aStart.Row()); 834 else 835 { 836 // Test if the right side is a numeric value 837 sal_uInt32 nFormat; 838 double fValue(0); >>> CID 1620326: (UNINIT) >>> Using uninitialized value "nFormat" when calling "IsNumberFormat". 839 if (m_rDoc.GetFormatTable()->IsNumberFormat(aValStr, nFormat, fValue)) 840 aConstraint.Right <<= fValue; 841 else 842 { 843 m_nStatus = sheet::SolverStatus::PARSE_ERROR; 844 m_sErrorMessage = ScResId(STR_SOLVER_TARGETVALUE_FAIL); ** CID 1620325: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4483 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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 1620325: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4483 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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)]&&)() 4477 embed::ElementModes::READWRITE), 4478 uno::UNO_SET_THROW); 4479 } 4480 } 4481 4482 bool bSuccess = false; >>> CID 1620325: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "this" is not initialized in this constructor nor in any functions that it calls. 4483 auto onODFSignDocumentContentFinished = [this, xMetaInf, xWriteableZipStor]() { 4484 uno::Reference< embed::XTransactedObject > xTransact( xMetaInf, uno::UNO_QUERY_THROW ); 4485 xTransact->commit(); 4486 xTransact.set( xWriteableZipStor, uno::UNO_QUERY_THROW ); 4487 xTransact->commit(); 4488 ** CID 1620324: Memory - illegal accesses (UNINIT) ________________________________________________________________________________________________________ *** CID 1620324: Memory - illegal accesses (UNINIT) /basctl/source/basicide/doceventnotifier.cxx: 112 in basctl::DocumentEventNotifier::Impl::~Impl()() 106 DocumentEventNotifier::Impl::~Impl () 107 { 108 std::unique_lock aGuard(m_aMutex); 109 if ( !impl_isDisposed_nothrow(aGuard) ) 110 { 111 acquire(); >>> CID 1620324: Memory - illegal accesses (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "unlock". 112 aGuard.unlock(); // dispose locks m_aMutex 113 dispose(); 114 } 115 } 116 117 void SAL_CALL DocumentEventNotifier::Impl::documentEventOccured( const DocumentEvent& _rEvent ) ** CID 1620323: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4527 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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 1620323: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4527 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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)]&&)() 4521 } 4522 else if (xWriteableZipStor.is()) 4523 { 4524 // OOXML. 4525 uno::Reference<io::XStream> xStream; 4526 >>> CID 1620323: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "this" is not initialized in this constructor nor in any functions that it calls. 4527 auto onOOXMLSignDocumentContentFinished = [this, xWriteableZipStor]() { 4528 uno::Reference<embed::XTransactedObject> xTransact(xWriteableZipStor, uno::UNO_QUERY_THROW); 4529 xTransact->commit(); 4530 4531 // the temporary file has been written, commit it to the original file 4532 Commit(); ** CID 1620322: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4347 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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 1620322: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4347 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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)]&&)() 4341 uno::Reference< embed::XStorage > xWriteableZipStor; 4342 4343 // we can reuse the temporary file if there is one already 4344 CreateTempFile( false ); 4345 GetMedium_Impl(); 4346 >>> CID 1620322: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "this" is not initialized in this constructor nor in any functions that it calls. 4347 auto onSignDocumentContentFinished = [this, rCallback](bool bRet) { 4348 CloseAndRelease(); 4349 4350 ResetError(); 4351 4352 rCallback(bRet); ** CID 1620321: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/unoobj/solveruno.cxx: 622 in ScSolverSettings::setConstraints(const com::sun::star::uno::Sequence<com::sun::star::sheet::ModelConstraint> &)() ________________________________________________________________________________________________________ *** CID 1620321: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/unoobj/solveruno.cxx: 622 in ScSolverSettings::setConstraints(const com::sun::star::uno::Sequence<com::sun::star::sheet::ModelConstraint> &)() 616 if (bOkRight) 617 aNewConst.aRightStr = sRight; 618 619 vRetConstraints.push_back(aNewConst); 620 } 621 >>> CID 1620321: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "vRetConstraints" is passed-by-value as parameter to "SetConstraints" when it could be moved instead. 622 m_pSettings->SetConstraints(vRetConstraints); 623 } 624 625 sal_Int32 SAL_CALL ScSolverSettings::getConstraintCount() 626 { 627 if (!m_pTable) ** CID 1620320: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4483 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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 1620320: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4483 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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)]&)() 4477 embed::ElementModes::READWRITE), 4478 uno::UNO_SET_THROW); 4479 } 4480 } 4481 4482 bool bSuccess = false; >>> CID 1620320: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "this" is not initialized in this constructor nor in any functions that it calls. 4483 auto onODFSignDocumentContentFinished = [this, xMetaInf, xWriteableZipStor]() { 4484 uno::Reference< embed::XTransactedObject > xTransact( xMetaInf, uno::UNO_QUERY_THROW ); 4485 xTransact->commit(); 4486 xTransact.set( xWriteableZipStor, uno::UNO_QUERY_THROW ); 4487 xTransact->commit(); 4488 ** CID 1620319: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4414 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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 1620319: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4414 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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)]&&)() 4408 // note: the storage passed here must be independent from the 4409 // xWriteableZipStor because a writable storage can't have 2 4410 // instances of sub-storage for the same directory open, but with 4411 // independent storages it somehow works 4412 xModelSigner->SignScriptingContentAsync( 4413 GetScriptingStorageToSign_Impl(), xStream, >>> CID 1620319: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "this" is not initialized in this constructor nor in any functions that it calls. 4414 [this, xSigner, xMetaInf, xWriteableZipStor, 4415 onSignDocumentContentFinished](bool bRet) { 4416 // remove the document signature if any 4417 OUString aDocSigName = xSigner->getDocumentContentSignatureDefaultStreamName(); 4418 if ( !aDocSigName.isEmpty() && xMetaInf->hasByName( aDocSigName ) ) 4419 xMetaInf->removeElement( aDocSigName ); ** CID 1620318: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4347 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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 1620318: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4347 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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)]&)() 4341 uno::Reference< embed::XStorage > xWriteableZipStor; 4342 4343 // we can reuse the temporary file if there is one already 4344 CreateTempFile( false ); 4345 GetMedium_Impl(); 4346 >>> CID 1620318: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "this" is not initialized in this constructor nor in any functions that it calls. 4347 auto onSignDocumentContentFinished = [this, rCallback](bool bRet) { 4348 CloseAndRelease(); 4349 4350 ResetError(); 4351 4352 rCallback(bRet); ** CID 1620317: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/unoobj/solveruno.cxx: 537 in ScSolverSettings::getConstraints()() ________________________________________________________________________________________________________ *** CID 1620317: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sc/source/ui/unoobj/solveruno.cxx: 537 in ScSolverSettings::getConstraints()() 531 aConstraint.Right = uno::Any(); 532 } 533 534 // Adds the constraint to the sequence 535 aRet.realloc(nCount + 1); 536 auto pArrConstraints = aRet.getArray(); >>> CID 1620317: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "aConstraint" is copied in a call to copy assignment "operator =", when it could be moved instead. 537 pArrConstraints[nCount] = aConstraint; 538 nCount++; 539 } 540 541 return aRet; 542 } ** CID 1620316: (UNINIT) /sc/source/ui/view/tabvwsh3.cxx: 861 in ScTabViewShell::Execute(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1620316: (UNINIT) /sc/source/ui/view/tabvwsh3.cxx: 861 in ScTabViewShell::Execute(SfxRequest &)() 855 bHasData, true); 856 if (!bHasData) 857 { 858 rReq.Done(); 859 break; 860 } >>> CID 1620316: (UNINIT) >>> Using uninitialized value "aResponse.bDuplicatRows". 861 int nLenEntries 862 = (aResponse.bDuplicatRows ? aCellRange.EndColumn - aCellRange.StartColumn 863 : aCellRange.EndRow - aCellRange.StartRow); 864 for (int i = 0; i <= nLenEntries; ++i) 865 aResponse.vEntries.push_back(i); 866 } /sc/source/ui/view/tabvwsh3.cxx: 917 in ScTabViewShell::Execute(SfxRequest &)() 911 aDialog->set_title(ScResId(STR_DUPLICATERECORDSDLG_WARNING)); 912 aDialog->run(); 913 } 914 } 915 916 if (bHasData) >>> CID 1620316: (UNINIT) >>> Using uninitialized value "aResponse.bIncludesHeaders" when calling "HandleDuplicateRecords". 917 GetViewData().GetViewShell()->HandleDuplicateRecords( 918 xActiveSheet, aCellRange, aResponse.bRemove, aResponse.bIncludesHeaders, 919 aResponse.bDuplicatRows, aResponse.vEntries); 920 921 rReq.Done(); 922 } ** CID 1620315: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4527 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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 1620315: Uninitialized members (UNINIT_CTOR) /sfx2/source/doc/docfile.cxx: 4527 in SfxMedium::SignContents_Impl(weld::Window *, bool, bool, SfxViewShell *, 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)]&)() 4521 } 4522 else if (xWriteableZipStor.is()) 4523 { 4524 // OOXML. 4525 uno::Reference<io::XStream> xStream; 4526 >>> CID 1620315: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "this" is not initialized in this constructor nor in any functions that it calls. 4527 auto onOOXMLSignDocumentContentFinished = [this, xWriteableZipStor]() { 4528 uno::Reference<embed::XTransactedObject> xTransact(xWriteableZipStor, uno::UNO_QUERY_THROW); 4529 xTransact->commit(); 4530 4531 // the temporary file has been written, commit it to the original file 4532 Commit(); ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3D1Qah_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtJLr8y-2BbbKRQu4mQrBMxdSHxuuDLl2LnSvuhY5R8ACJRC3rjNGOVxvAXfYEPPxIIPl9cFfQllBdO2-2F4U-2Bs5bN5QXNpp08iHlP5P1Q7ipd-2FXQlTA5VCnW1n2OfgpaBQ-2B0aNYcIXPlQy8szR5xpsNzv00GjdOJJs8GA9AOnGczpW6E-3D