Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
6 new defect(s) introduced to LibreOffice found with Coverity Scan. 2 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 6 of 6 defect(s) ** CID 1655271: Control flow issues (DEADCODE) /sw/source/core/text/portxt.cxx: 433 in SwTextPortion::Format_(SwTextFormatInfo &)() _____________________________________________________________________________________________ *** CID 1655271: Control flow issues (DEADCODE) /sw/source/core/text/portxt.cxx: 433 in SwTextPortion::Format_(SwTextFormatInfo &)() 427 bool bOrigHyphenated = pGuess->HyphWord().is() && 428 pGuess->BreakPos() > rInf.GetLineStart(); 429 // calculate line breaking with desired word spacing, also 430 // if the desired word spacing is 100%, but there is a greater 431 // maximum word spacing, and the word is hyphenated at the desired 432 // word spacing: to skip hyphenation, if the maximum word spacing allows it >>> CID 1655271: Control flow issues (DEADCODE) >>> Execution cannot reach the expression "bWordSpacingMaximum" inside this >>> statement: "if (bWordSpacing || (bWordS...". 433 if ( bWordSpacing || ( bWordSpacingMaximum && bOrigHyphenated ) ) 434 { 435 pGuess.emplace(); 436 bFull = !pGuess->Guess( *this, rInf, Height(), nSpacesInLine, aAdjustItem.GetPropWordSpacing(), nSpaceWidth ); 437 sal_Int32 nSpacesInLine2 = rInf.GetLineSpaceCount( pGuess->BreakPos() ); 438 ** CID 1655270: (UNCAUGHT_EXCEPT) /sw/source/uibase/uno/loktxdoc.cxx: 890 in <unnamed>::HideNewerShowOlder::~HideNewerShowOlder()() /sw/source/uibase/uno/loktxdoc.cxx: 890 in <unnamed>::HideNewerShowOlder::~HideNewerShowOlder()() _____________________________________________________________________________________________ *** CID 1655270: (UNCAUGHT_EXCEPT) /sw/source/uibase/uno/loktxdoc.cxx: 890 in <unnamed>::HideNewerShowOlder::~HideNewerShowOlder()() 884 if (hide) 885 Hide(pRedline, m_rTable); 886 else 887 Show(pRedline, m_rTable); 888 } 889 } >>> CID 1655270: (UNCAUGHT_EXCEPT) >>> An exception of type "boost::wrapexcept<boost::bad_rational>" is thrown >>> but the exception specification "/*implicit*/noexcept" doesn't allow it to >>> be thrown. This will result in a call to terminate(). 890 ~HideNewerShowOlder() 891 { 892 // I assume, that only the redlines explicitly handled in ctor would change their visible 893 // state; so here, only Insert / Delete redlines will be handled. 894 for (auto[pRedline, visible] : m_aRedlineShowStateRestore) 895 { /sw/source/uibase/uno/loktxdoc.cxx: 890 in <unnamed>::HideNewerShowOlder::~HideNewerShowOlder()() 884 if (hide) 885 Hide(pRedline, m_rTable); 886 else 887 Show(pRedline, m_rTable); 888 } 889 } >>> CID 1655270: (UNCAUGHT_EXCEPT) >>> An exception of type "boost::wrapexcept<boost::bad_rational>" is thrown >>> but the exception specification "/*implicit*/noexcept" doesn't allow it to >>> be thrown. This will result in a call to terminate(). 890 ~HideNewerShowOlder() 891 { 892 // I assume, that only the redlines explicitly handled in ctor would change their visible 893 // state; so here, only Insert / Delete redlines will be handled. 894 for (auto[pRedline, visible] : m_aRedlineShowStateRestore) 895 { ** CID 1655269: Error handling issues (CHECKED_RETURN) /svtools/source/config/extcolorcfg.cxx: 409 in svtools::ExtendedColorConfig_Impl::ImplCommit()() _____________________________________________________________________________________________ *** CID 1655269: Error handling issues (CHECKED_RETURN) /svtools/source/config/extcolorcfg.cxx: 409 in svtools::ExtendedColorConfig_Impl::ImplCommit()() 403 404 uno::Sequence < beans::PropertyValue > aPropValues(configValue.second.first.size()); 405 beans::PropertyValue* pPropValues = aPropValues.getArray(); 406 for (auto const& elem : configValue.second.first) 407 { 408 pPropValues->Name = sNode + s_sSep + elem.first; >>> CID 1655269: Error handling issues (CHECKED_RETURN) >>> Calling "AddNode" without checking return value (as is done elsewhere 4 >>> out of 5 times). 409 ConfigItem::AddNode(sNode, elem.first); 410 pPropValues->Name += sColor; 411 pPropValues->Value <<= elem.second.getColor(); 412 // the default color will never be changed 413 ++pPropValues; 414 } ** CID 1655268: API usage errors (LOCK) _____________________________________________________________________________________________ *** CID 1655268: API usage errors (LOCK) /framework/source/services/pathsettings.cxx: 451 in <unnamed>::PathSettings::~PathSettings()() 445 } 446 447 PathSettings::~PathSettings() 448 { 449 std::unique_lock g(m_aMutex); 450 disposing(g); >>> CID 1655268: API usage errors (LOCK) >>> "~OPropertySetHelper" uses "this->m_aMutex" in an uninitialized state. 451 } 452 453 void PathSettings::disposing(std::unique_lock<std::mutex>& /*g*/) 454 { 455 css::uno::Reference< css::util::XChangesNotifier > 456 xBroadcaster(m_xCfgNew, css::uno::UNO_QUERY); ** CID 1655267: (UNCAUGHT_EXCEPT) /sw/source/uibase/uno/loktxdoc.cxx: 890 in <unnamed>::HideNewerShowOlder::~HideNewerShowOlder()() /sw/source/uibase/uno/loktxdoc.cxx: 890 in <unnamed>::HideNewerShowOlder::~HideNewerShowOlder()() _____________________________________________________________________________________________ *** CID 1655267: (UNCAUGHT_EXCEPT) /sw/source/uibase/uno/loktxdoc.cxx: 890 in <unnamed>::HideNewerShowOlder::~HideNewerShowOlder()() 884 if (hide) 885 Hide(pRedline, m_rTable); 886 else 887 Show(pRedline, m_rTable); 888 } 889 } >>> CID 1655267: (UNCAUGHT_EXCEPT) >>> An exception of type "com::sun::star::uno::RuntimeException" is thrown >>> but the exception specification "/*implicit*/noexcept" doesn't allow it to >>> be thrown. This will result in a call to terminate(). 890 ~HideNewerShowOlder() 891 { 892 // I assume, that only the redlines explicitly handled in ctor would change their visible 893 // state; so here, only Insert / Delete redlines will be handled. 894 for (auto[pRedline, visible] : m_aRedlineShowStateRestore) 895 { /sw/source/uibase/uno/loktxdoc.cxx: 890 in <unnamed>::HideNewerShowOlder::~HideNewerShowOlder()() 884 if (hide) 885 Hide(pRedline, m_rTable); 886 else 887 Show(pRedline, m_rTable); 888 } 889 } >>> CID 1655267: (UNCAUGHT_EXCEPT) >>> An exception of type "com::sun::star::uno::RuntimeException" is thrown >>> but the exception specification "/*implicit*/noexcept" doesn't allow it to >>> be thrown. This will result in a call to terminate(). 890 ~HideNewerShowOlder() 891 { 892 // I assume, that only the redlines explicitly handled in ctor would change their visible 893 // state; so here, only Insert / Delete redlines will be handled. 894 for (auto[pRedline, visible] : m_aRedlineShowStateRestore) 895 { ** CID 1655266: Error handling issues (CHECKED_RETURN) /sc/source/core/data/documen4.cxx: 811 in ScDocument::GetCondResult(short, int, short, ScRefCellValue *) const() _____________________________________________________________________________________________ *** CID 1655266: Error handling issues (CHECKED_RETURN) /sc/source/core/data/documen4.cxx: 811 in ScDocument::GetCondResult(short, int, short, ScRefCellValue *) const() 805 pCell = &aCell; 806 } 807 // if the underlying cell needs evaluation, ScPatternAttr 808 // and ScCondFormatIndexes might end up being deleted under 809 // us, so we need to trigger evaluation before accessing them. 810 if (pCell->getType() == CELLTYPE_FORMULA) >>> CID 1655266: Error handling issues (CHECKED_RETURN) >>> Calling "IsValue" without checking return value (as is done elsewhere >>> 66 out of 69 times). 811 pCell->getFormula()->IsValue(); 812 const ScPatternAttr* pPattern = GetPattern( nCol, nRow, nTab ); 813 const ScCondFormatIndexes& rIndex = 814 pPattern->GetItem(ATTR_CONDITIONAL).GetCondFormatData(); 815 816 return GetCondResult(*pCell, aPos, *pFormatList, rIndex); ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/libreoffice?tab=overview