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. 7 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 1438198: API usage errors (INVALIDATE_ITERATOR) /editeng/source/editeng/impedit2.cxx: 1740 in ImpEditEngine::InitScriptTypes(int)() ________________________________________________________________________________________________________ *** CID 1438198: API usage errors (INVALIDATE_ITERATOR) /editeng/source/editeng/impedit2.cxx: 1740 in ImpEditEngine::InitScriptTypes(int)() 1734 // Skip entries in ScriptArray which are not inside the RTL run: 1735 while ( nIdx < rTypes.size() && rTypes[nIdx].nStartPos < nStart ) 1736 ++nIdx; 1737 1738 // Remove any entries *inside* the current run: 1739 while ( nIdx < rTypes.size() && rTypes[nIdx].nEndPos <= nEnd ) >>> CID 1438198: API usage errors (INVALIDATE_ITERATOR) >>> Using invalid iterator "std::vector<ScriptTypePosInfo, std::allocator<ScriptTypePosInfo> >::const_iterator(rTypes->begin() + nIdx)". 1740 rTypes.erase( rTypes.begin()+nIdx ); 1741 1742 // special case: 1743 if(nIdx < rTypes.size() && rTypes[nIdx].nStartPos < nStart && rTypes[nIdx].nEndPos > nEnd) 1744 { 1745 rTypes.insert( rTypes.begin()+nIdx, ScriptTypePosInfo( rTypes[nIdx].nScriptType, nEnd, rTypes[nIdx].nEndPos ) ); ** CID 1438197: (DEADCODE) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1317 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolygonHairlinePrimitive2D(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D &)() /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1329 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolygonHairlinePrimitive2D(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D &)() ________________________________________________________________________________________________________ *** CID 1438197: (DEADCODE) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1317 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolygonHairlinePrimitive2D(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D &)() 1311 // the MetaActionType::POLYPOLYGON written by RenderPolygonHairlinePrimitive2D 1312 // below 1313 bool bSupportSvtGraphicStroke(false); 1314 1315 if(bSupportSvtGraphicStroke) 1316 { >>> CID 1438197: (DEADCODE) >>> Execution cannot reach this statement: "pSvtGraphicStroke = this->i...". 1317 pSvtGraphicStroke = impTryToCreateSvtGraphicStroke( 1318 rHairlinePrimitive.getB2DPolygon(), 1319 &aLineColor, 1320 nullptr, nullptr, nullptr, nullptr); 1321 1322 impStartSvtGraphicStroke(pSvtGraphicStroke); /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1329 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolygonHairlinePrimitive2D(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D &)() 1323 } 1324 1325 RenderPolygonHairlinePrimitive2D(rHairlinePrimitive, false); 1326 1327 if(bSupportSvtGraphicStroke) 1328 { >>> CID 1438197: (DEADCODE) >>> Execution cannot reach this statement: "this->impEndSvtGraphicStrok...". 1329 impEndSvtGraphicStroke(pSvtGraphicStroke); 1330 } 1331 } 1332 } 1333 1334 void VclMetafileProcessor2D::processPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D& rStrokePrimitive) ** CID 1438196: (DEADCODE) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1792 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonColorPrimitive2D(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D &)() /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1819 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonColorPrimitive2D(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D &)() /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1826 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonColorPrimitive2D(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D &)() ________________________________________________________________________________________________________ *** CID 1438196: (DEADCODE) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1792 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonColorPrimitive2D(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D &)() 1786 1787 // #i121267# Not needed, does not give better quality compared with 1788 // the MetaActionType::POLYPOLYGON written by the DrawPolyPolygon command 1789 // below 1790 bool bSupportSvtGraphicFill(false); 1791 >>> CID 1438196: (DEADCODE) >>> Execution cannot reach the expression "this->mnSvtGraphicFillCount" inside this statement: "if (bSupportSvtGraphicFill ...". 1792 if(bSupportSvtGraphicFill && !mnSvtGraphicFillCount && aLocalPolyPolygon.count()) 1793 { 1794 // setup simple color fill stuff like in impgrfll 1795 pSvtGraphicFill = new SvtGraphicFill( 1796 getFillPolyPolygon(aLocalPolyPolygon), 1797 Color(aPolygonColor), /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1819 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonColorPrimitive2D(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D &)() 1813 mpOutputDevice->SetFillColor(Color(aPolygonColor)); 1814 mpOutputDevice->SetLineColor(); 1815 1816 // call VCL directly; encapsulate with SvtGraphicFill 1817 if(bSupportSvtGraphicFill) 1818 { >>> CID 1438196: (DEADCODE) >>> Execution cannot reach this statement: "this->impStartSvtGraphicFil...". 1819 impStartSvtGraphicFill(pSvtGraphicFill); 1820 } 1821 1822 mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon); 1823 1824 if(bSupportSvtGraphicFill) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1826 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonColorPrimitive2D(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D &)() 1820 } 1821 1822 mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon); 1823 1824 if(bSupportSvtGraphicFill) 1825 { >>> CID 1438196: (DEADCODE) >>> Execution cannot reach this statement: "this->impEndSvtGraphicFill(...". 1826 impEndSvtGraphicFill(pSvtGraphicFill); 1827 } 1828 1829 mpOutputDevice->Pop(); 1830 } 1831 ** CID 1438195: (DEADCODE) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1942 in drawinglayer::processor2d::VclMetafileProcessor2D::processUnifiedTransparencePrimitive2D(const drawinglayer::primitive2d::UnifiedTransparencePrimitive2D &)() /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1970 in drawinglayer::processor2d::VclMetafileProcessor2D::processUnifiedTransparencePrimitive2D(const drawinglayer::primitive2d::UnifiedTransparencePrimitive2D &)() /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1979 in drawinglayer::processor2d::VclMetafileProcessor2D::processUnifiedTransparencePrimitive2D(const drawinglayer::primitive2d::UnifiedTransparencePrimitive2D &)() ________________________________________________________________________________________________________ *** CID 1438195: (DEADCODE) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1942 in drawinglayer::processor2d::VclMetafileProcessor2D::processUnifiedTransparencePrimitive2D(const drawinglayer::primitive2d::UnifiedTransparencePrimitive2D &)() 1936 1937 // #i121267# Not needed, does not give better quality compared with 1938 // the MetaActionType::POLYPOLYGON written by the DrawPolyPolygon command 1939 // below 1940 bool bSupportSvtGraphicFill(false); 1941 >>> CID 1438195: (DEADCODE) >>> Execution cannot reach the expression "this->mnSvtGraphicFillCount" inside this statement: "if (bSupportSvtGraphicFill ...". 1942 if(bSupportSvtGraphicFill && !mnSvtGraphicFillCount && aLocalPolyPolygon.count()) 1943 { 1944 // setup simple color with transparence fill stuff like in impgrfll 1945 pSvtGraphicFill = new SvtGraphicFill( 1946 getFillPolyPolygon(aLocalPolyPolygon), 1947 Color(aPolygonColor), /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1970 in drawinglayer::processor2d::VclMetafileProcessor2D::processUnifiedTransparencePrimitive2D(const drawinglayer::primitive2d::UnifiedTransparencePrimitive2D &)() 1964 mpOutputDevice->SetFillColor(Color(aPolygonColor)); 1965 mpOutputDevice->SetLineColor(); 1966 1967 // call VCL directly; encapsulate with SvtGraphicFill 1968 if(bSupportSvtGraphicFill) 1969 { >>> CID 1438195: (DEADCODE) >>> Execution cannot reach this statement: "this->impStartSvtGraphicFil...". 1970 impStartSvtGraphicFill(pSvtGraphicFill); 1971 } 1972 1973 mpOutputDevice->DrawTransparent( 1974 ::tools::PolyPolygon(aLocalPolyPolygon), 1975 nTransPercentVcl); /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1979 in drawinglayer::processor2d::VclMetafileProcessor2D::processUnifiedTransparencePrimitive2D(const drawinglayer::primitive2d::UnifiedTransparencePrimitive2D &)() 1973 mpOutputDevice->DrawTransparent( 1974 ::tools::PolyPolygon(aLocalPolyPolygon), 1975 nTransPercentVcl); 1976 1977 if(bSupportSvtGraphicFill) 1978 { >>> CID 1438195: (DEADCODE) >>> Execution cannot reach this statement: "this->impEndSvtGraphicFill(...". 1979 impEndSvtGraphicFill(pSvtGraphicFill); 1980 } 1981 } 1982 else 1983 { 1984 // save old mfCurrentUnifiedTransparence and set new one ** CID 1438194: Resource leaks (RESOURCE_LEAK) /sal/osl/unx/tempfile.cxx: 327 in osl_createTempFile() ________________________________________________________________________________________________________ *** CID 1438194: Resource leaks (RESOURCE_LEAK) /sal/osl/unx/tempfile.cxx: 327 in osl_createTempFile() 321 322 rtl_uString_release(temp_file_url); 323 } 324 325 rtl_uString_release(base_directory); 326 >>> CID 1438194: Resource leaks (RESOURCE_LEAK) >>> Variable "temp_file_handle" going out of scope leaks the storage it points to. 327 return osl_error; 328 } 329 ________________________________________________________________________________________________________ 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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy-2FodYJ6gwI43PM9kgQVyQJfyZrcWmekafa-2BwJBDFSHT7nq4V2tmt6kox4IG3E5-2FlrBJ4uSkp6CNrZSYBJgS57ksxbGeARKobb7ZydQhispoIT8yzZVunEm0tNl4z9KmjI3JhpgpJyXUJcmstcwAaAvu6bnR-2Bh-2FXeOxz1NoEffr6k-3D