Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 9 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 9 of 9 defect(s) ** CID 1440845: API usage errors (INVALIDATE_ITERATOR) /sw/source/ui/dbui/customizeaddresslistdialog.cxx: 142 in SwCustomizeAddressListDialog::UpDownHdl_Impl(weld::Button &)() ________________________________________________________________________________________________________ *** CID 1440845: API usage errors (INVALIDATE_ITERATOR) /sw/source/ui/dbui/customizeaddresslistdialog.cxx: 142 in SwCustomizeAddressListDialog::UpDownHdl_Impl(weld::Button &)() 136 OUString sHeader = m_xNewData->aDBColumnHeaders[nOldPos]; 137 m_xNewData->aDBColumnHeaders.erase(m_xNewData->aDBColumnHeaders.begin() + nOldPos); 138 m_xNewData->aDBColumnHeaders.insert(m_xNewData->aDBColumnHeaders.begin() + nPos, sHeader); 139 for (auto& rData : m_xNewData->aDBData) 140 { 141 OUString sData = rData[nOldPos]; >>> CID 1440845: API usage errors (INVALIDATE_ITERATOR) >>> Using invalid iterator "std::vector<rtl::OUString, std::allocator<rtl::OUString> >::const_iterator(rData->begin() + nOldPos)". 142 rData.erase(rData.begin() + nOldPos); 143 rData.insert(rData.begin() + nPos, sData); 144 } 145 146 UpdateButtons(); 147 } ** CID 1440844: Memory - illegal accesses (UNINIT) ________________________________________________________________________________________________________ *** CID 1440844: Memory - illegal accesses (UNINIT) /vcl/source/gdi/impglyphitem.cxx: 33 in SalLayoutGlyphs::SalLayoutGlyphs(const SalLayoutGlyphs&)() 27 : m_pImpl(nullptr) 28 { 29 } 30 31 SalLayoutGlyphs::~SalLayoutGlyphs() { delete m_pImpl; } 32 >>> CID 1440844: Memory - illegal accesses (UNINIT) >>> Using uninitialized value "this->m_pImpl" when calling "operator =". 33 SalLayoutGlyphs::SalLayoutGlyphs(const SalLayoutGlyphs& rOther) { operator=(rOther); } 34 35 SalLayoutGlyphs& SalLayoutGlyphs::operator=(const SalLayoutGlyphs& rOther) 36 { 37 delete m_pImpl; 38 m_pImpl = rOther.m_pImpl ? rOther.m_pImpl->clone(*this) : nullptr; ** CID 1440843: Memory - illegal accesses (WRAPPER_ESCAPE) /sot/source/sdstor/stgdir.cxx: 661 in StgDirEntry::Tmp2Strm()() ________________________________________________________________________________________________________ *** CID 1440843: Memory - illegal accesses (WRAPPER_ESCAPE) /sot/source/sdstor/stgdir.cxx: 661 in StgDirEntry::Tmp2Strm()() 655 return false; 656 } 657 else 658 { 659 m_pStgStrm->SetSize( 0 ); 660 delete m_pStgStrm; >>> CID 1440843: Memory - illegal accesses (WRAPPER_ESCAPE) >>> The internal representation of local "pNewStrm" escapes into "this->m_pStgStrm", but is destroyed when it exits scope. 661 m_pStgStrm = pNewStrm.get(); 662 pNewStrm->SetEntry( *this ); 663 pNewStrm->Pos2Page( m_nPos ); 664 pNewStrm.release(); 665 delete m_pTmpStrm; 666 delete m_pCurStrm; ** CID 1440842: API usage errors (INVALIDATE_ITERATOR) /sw/source/ui/dbui/customizeaddresslistdialog.cxx: 118 in SwCustomizeAddressListDialog::DeleteHdl_Impl(weld::Button &)() ________________________________________________________________________________________________________ *** CID 1440842: API usage errors (INVALIDATE_ITERATOR) /sw/source/ui/dbui/customizeaddresslistdialog.cxx: 118 in SwCustomizeAddressListDialog::DeleteHdl_Impl(weld::Button &)() 112 m_xFieldsLB->select(nPos > m_xFieldsLB->n_children() - 1 ? nPos - 1 : nPos); 113 114 //remove the column 115 m_xNewData->aDBColumnHeaders.erase(m_xNewData->aDBColumnHeaders.begin() + nPos); 116 //remove the data 117 for (auto& rData : m_xNewData->aDBData) >>> CID 1440842: API usage errors (INVALIDATE_ITERATOR) >>> Using invalid iterator "std::vector<rtl::OUString, std::allocator<rtl::OUString> >::const_iterator(rData->begin() + nPos)". 118 rData.erase(rData.begin() + nPos); 119 120 UpdateButtons(); 121 } 122 123 IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, weld::Button&, rButton, void) ** CID 1440841: Error handling issues (CHECKED_RETURN) /vcl/source/outdev/font.cxx: 977 in OutputDevice::GetFontInstance() const() ________________________________________________________________________________________________________ *** CID 1440841: Error handling issues (CHECKED_RETURN) /vcl/source/outdev/font.cxx: 977 in OutputDevice::GetFontInstance() const() 971 mbInitFont = false; 972 return true; 973 } 974 975 const LogicalFontInstance* OutputDevice::GetFontInstance() const 976 { >>> CID 1440841: Error handling issues (CHECKED_RETURN) >>> Calling "InitFont" without checking return value (as is done elsewhere 8 out of 10 times). 977 InitFont(); 978 return mpFontInstance.get(); 979 } 980 981 bool OutputDevice::ImplNewFont() const 982 { ** CID 1440840: Uninitialized members (UNINIT_CTOR) /sw/source/filter/ww8/docxtablestyleexport.cxx: 28 in DocxTableStyleExport::Impl::Impl()() ________________________________________________________________________________________________________ *** CID 1440840: Uninitialized members (UNINIT_CTOR) /sw/source/filter/ww8/docxtablestyleexport.cxx: 28 in DocxTableStyleExport::Impl::Impl()() 22 using namespace oox; 23 24 /// Methods in this class handle values in a table style. 25 struct DocxTableStyleExport::Impl 26 { 27 private: >>> CID 1440840: Uninitialized members (UNINIT_CTOR) >>> The compiler-generated constructor for this class does not initialize "m_pDoc". 28 SwDoc* m_pDoc; 29 sax_fastparser::FSHelperPtr m_pSerializer; 30 31 public: 32 void TableStyle(uno::Sequence<beans::PropertyValue>& rStyle); 33 ** CID 1440839: Incorrect expression (COPY_PASTE_ERROR) /connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx: 735 in connectivity::mysqlc::ODatabaseMetaData::getColumns(const com::sun::star::uno::Any &, const rtl::OUString &, const rtl::OUString &, const rtl::OUString &)() ________________________________________________________________________________________________________ *** CID 1440839: Incorrect expression (COPY_PASTE_ERROR) /connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx: 735 in connectivity::mysqlc::ODatabaseMetaData::getColumns(const com::sun::star::uno::Any &, const rtl::OUString &, const rtl::OUString &, const rtl::OUString &)() 729 sAppend = "AND TABLE_NAME = '%' "; 730 queryBuf.append(sAppend.replaceAll("%", tableNamePattern)); 731 } 732 if (!schemaPattern.isEmpty()) 733 { 734 OUString sAppend; >>> CID 1440839: Incorrect expression (COPY_PASTE_ERROR) >>> "tableNamePattern" in "tableNamePattern->match("%", 0)" looks like a copy-paste error. 735 if (tableNamePattern.match("%")) 736 sAppend = "AND TABLE_SCHEMA LIKE '%' "; 737 else 738 sAppend = "AND TABLE_SCHEMA = '%' "; 739 queryBuf.append(sAppend.replaceAll("%", schemaPattern)); 740 } ** CID 1440838: Error handling issues (CHECKED_RETURN) /extensions/source/scanner/sane.cxx: 791 in Sane::Start(BitmapTransporter &)() ________________________________________________________________________________________________________ *** CID 1440838: Error handling issues (CHECKED_RETURN) /extensions/source/scanner/sane.cxx: 791 in Sane::Start(BitmapTransporter &)() 785 } 786 aConverter.Seek( 1084 ); 787 } 788 789 for (nLine = nHeight-1; nLine >= 0; --nLine) 790 { >>> CID 1440838: Error handling issues (CHECKED_RETURN) >>> Calling "fseek(pFrame, nLine * aParams.bytes_per_line, 0)" without checking return value. This library function may fail and return an error code. 791 fseek( pFrame, nLine * aParams.bytes_per_line, SEEK_SET ); 792 if( eType == FrameStyle_BW || 793 ( eType == FrameStyle_Gray && aParams.depth == 8 ) 794 ) 795 { 796 SANE_Int items_read = fread( pBuffer.get(), 1, aParams.bytes_per_line, pFrame ); ** CID 1440837: Error handling issues (CHECKED_RETURN) /vcl/source/outdev/text.cxx: 230 in OutputDevice::ImplDrawRotateText(SalLayout &)() ________________________________________________________________________________________________________ *** CID 1440837: Error handling issues (CHECKED_RETURN) /vcl/source/outdev/text.cxx: 230 in OutputDevice::ImplDrawRotateText(SalLayout &)() 224 aFont.SetOrientation( 0 ); 225 aFont.SetFontSize( Size( rPattern.mnWidth, rPattern.mnHeight ) ); 226 pVDev->SetFont( aFont ); 227 pVDev->SetTextColor( COL_BLACK ); 228 pVDev->SetTextFillColor(); 229 pVDev->ImplNewFont(); >>> CID 1440837: Error handling issues (CHECKED_RETURN) >>> Calling "InitFont" without checking return value (as is done elsewhere 8 out of 10 times). 230 pVDev->InitFont(); 231 pVDev->ImplInitTextColor(); 232 233 // draw text into upper left corner 234 rSalLayout.DrawBase() -= aBoundRect.TopLeft(); 235 rSalLayout.DrawText( *pVDev->mpGraphics ); ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpybx3WWDOZ7k0ZJFwZD6i6le2BPKd0sv44Y-2Fz-2B9Hy7SsLai8Ql97rpIycXNVcqcY-2FIDDdpqCPr8IGyq9-2BjPslG0Vuj9RdEcKwHcfmD9lK59y4bT9MLJ2kRPeYFjbo5CG74lE6TyFhAVNdK7MoqdBQ0OygL8icMMXQ4-2FXjVaxC-2BI1Y-3D _______________________________________________ LibreOffice mailing list LibreOffice@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/libreoffice