Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 5 new defect(s) introduced to LibreOffice found with Coverity Scan. 3 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 5 of 5 defect(s) ** CID 1634810: Integer handling issues (INTEGER_OVERFLOW) /sw/source/core/text/frmcrsr.cxx: 1654 in SwTextFrame::FillCursorPos(SwFillData &) const() ________________________________________________________________________________________________________ *** CID 1634810: Integer handling issues (INTEGER_OVERFLOW) /sw/source/core/text/frmcrsr.cxx: 1654 in SwTextFrame::FillCursorPos(SwFillData &) const() 1648 nTabCnt = 0; 1649 nSpaceCnt = 0; 1650 } 1651 else 1652 { 1653 rRect.Left( nRightTab ); >>> CID 1634810: Integer handling issues (INTEGER_OVERFLOW) >>> Expression "++nTabCnt", which is equal to 0, where "nTabCnt" is known to be equal to 65535, overflows the type that receives it, an unsigned integer 16 bits wide. 1654 ++nTabCnt; 1655 } 1656 } 1657 } 1658 else if( SwFillMode::Space == rFill.Mode() ) 1659 { ** CID 1634809: Null pointer dereferences (NULL_RETURNS) ________________________________________________________________________________________________________ *** CID 1634809: Null pointer dereferences (NULL_RETURNS) /editeng/source/editeng/impedit2.cxx: 3790 in ImpEditEngine::GetDocPosTopLeft(int)() 3784 3785 Point ImpEditEngine::GetDocPosTopLeft( sal_Int32 nParagraph ) 3786 { 3787 const ParaPortion* pPPortion = maParaPortionList.SafeGetObject(nParagraph); 3788 DBG_ASSERT( pPPortion, "Paragraph not found: GetWindowPosTopLeft" ); 3789 >>> CID 1634809: Null pointer dereferences (NULL_RETURNS) >>> Dereferencing a pointer that might be "nullptr" "pPPortion" when calling "GetNode". 3790 auto stMetrics = GetFontUnitMetrics(pPPortion->GetNode()); 3791 3792 Point aPoint; 3793 if ( pPPortion ) 3794 { 3795 // If someone calls GetLineHeight() with an empty Engine. ** CID 1634808: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /svl/source/crypto/cryptosign.cxx: 992 in svl::crypto::Signing::Sign(rtl::OStringBuffer &)() ________________________________________________________________________________________________________ *** CID 1634808: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /svl/source/crypto/cryptosign.cxx: 992 in svl::crypto::Signing::Sign(rtl::OStringBuffer &)() 986 { 987 m_rSigningContext.m_nSignatureTime = now / 1000; 988 } 989 990 if (!m_rSigningContext.m_xCertificate.is()) 991 { >>> CID 1634808: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "aHashResult" is copied in a call to copy assignment "operator =", when it could be moved instead. 992 m_rSigningContext.m_aDigest = aHashResult; 993 // No certificate is provided: don't actually sign -- just update the context with the 994 // parameters for the signing and return. 995 return false; 996 } 997 ** CID 1634807: Null pointer dereferences (REVERSE_INULL) /editeng/source/editeng/impedit2.cxx: 3793 in ImpEditEngine::GetDocPosTopLeft(int)() ________________________________________________________________________________________________________ *** CID 1634807: Null pointer dereferences (REVERSE_INULL) /editeng/source/editeng/impedit2.cxx: 3793 in ImpEditEngine::GetDocPosTopLeft(int)() 3787 const ParaPortion* pPPortion = maParaPortionList.SafeGetObject(nParagraph); 3788 DBG_ASSERT( pPPortion, "Paragraph not found: GetWindowPosTopLeft" ); 3789 3790 auto stMetrics = GetFontUnitMetrics(pPPortion->GetNode()); 3791 3792 Point aPoint; >>> CID 1634807: Null pointer dereferences (REVERSE_INULL) >>> Null-checking "pPPortion" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 3793 if ( pPPortion ) 3794 { 3795 // If someone calls GetLineHeight() with an empty Engine. 3796 DBG_ASSERT(IsFormatted() || !IsFormatting(), "GetDocPosTopLeft: Doc not formatted - unable to format!"); 3797 if (!IsFormatted()) 3798 FormatAndLayout(); ** CID 1634806: Control flow issues (DEADCODE) /sw/source/uibase/misc/redlndlg.cxx: 1397 in SwRedlineAcceptDlg::GotoHdl(Timer *)() ________________________________________________________________________________________________________ *** CID 1634806: Control flow issues (DEADCODE) /sw/source/uibase/misc/redlndlg.cxx: 1397 in SwRedlineAcceptDlg::GotoHdl(Timer *)() 1391 pSh->LeaveAddMode(); 1392 pSh->EndAction(); 1393 SwViewShell::SetCareDialog(nullptr); 1394 } 1395 } 1396 >>> CID 1634806: Control flow issues (DEADCODE) >>> Execution cannot reach the expression "NULL" inside this statement: "pShell = (pSh ? pSh->GetDoc...". 1397 SwDocShell* pShell = pSh ? pSh->GetDoc()->GetDocShell() : nullptr; 1398 bool const bEnable = pShell && !pShell->IsReadOnly() 1399 && !pSh->getIDocumentRedlineAccess().GetRedlinePassword().hasElements(); 1400 m_pTPView->EnableAccept( bEnable && bSel /*&& !bReadonlySel*/ ); 1401 m_pTPView->EnableReject( bEnable && bSel /*&& !bReadonlySel*/ ); 1402 m_pTPView->EnableClearFormat( bEnable && bSel && !bIsNotFormated /*&& !bReadonlySel*/ ); ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DeuOO_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtfw0TfG84DCukfEHSdnLXiUXuC2q1ZqgjpU-2FgMmHMMsBHzASHhCnZxe54RGv0K7EPzW4hSOMy46CXbw26-2BnctILEukPU9b0xzXsHto-2BoYIooHp7qE78DSA9dRX-2FABNqJTUq1ygJE9508kdPz99qZ-2FrO4R1Hwm8FlIWN1w12K3k5g-3D