New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Fri Jul 29 08:15:00 UTC 2022


Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 4 of 4 defect(s)


** CID 1507492:  Integer handling issues  (NEGATIVE_RETURNS)


________________________________________________________________________________________________________
*** CID 1507492:  Integer handling issues  (NEGATIVE_RETURNS)
/oox/source/export/shapes.cxx: 1783 in oox::drawingml::ShapeExport::WriteConnectorShape(const com::sun::star::uno::Reference<com::sun::star::drawing::XShape> &)()
1777             pFS->startElementNS(mnXmlNamespace, XML_cNvCxnSpPr);
1778     
1779             if (GetShapeID(rXShapeA) == -1)
1780                 GetNewShapeID(rXShapeA);
1781             if (GetShapeID(rXShapeB) == -1)
1782                 GetNewShapeID(rXShapeB);
>>>     CID 1507492:  Integer handling issues  (NEGATIVE_RETURNS)
>>>     "nStartGlueId" is passed to a parameter that cannot be negative.
1783             WriteConnectorConnections(nStartGlueId, nEndGlueId, GetShapeID(rXShapeA), GetShapeID(rXShapeB));
1784             pFS->endElementNS(mnXmlNamespace, XML_cNvCxnSpPr);
1785             if (GetDocumentType() == DOCUMENT_PPTX)
1786                 pFS->singleElementNS(mnXmlNamespace, XML_nvPr);
1787             pFS->endElementNS(mnXmlNamespace, XML_nvCxnSpPr);
1788         }

** CID 1507491:  Possible Control flow issues  (DEADCODE)
/oox/source/export/chartexport.cxx: 2067 in oox::drawingml::ChartExport::exportDataTable()()


________________________________________________________________________________________________________
*** CID 1507491:  Possible Control flow issues  (DEADCODE)
/oox/source/export/chartexport.cxx: 2067 in oox::drawingml::ChartExport::exportDataTable()()
2061             pFS->singleElement(FSNS(XML_c, XML_showHorzBorder), XML_val, "1" );
2062         if (bShowVBorder)
2063             pFS->singleElement(FSNS(XML_c, XML_showVertBorder), XML_val, "1");
2064         if (bShowOutline)
2065             pFS->singleElement(FSNS(XML_c, XML_showOutline), XML_val, "1");
2066         if (bShowKeys)
>>>     CID 1507491:  Possible Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "pFS->singleElement(67113558...".
2067             pFS->singleElement(FSNS(XML_c, XML_showKeys), XML_val, "1");
2068     
2069         exportShapeProps(aPropSet);
2070         exportTextProps(aPropSet);
2071     
2072         pFS->endElement(FSNS(XML_c, XML_dTable));

** CID 1507490:  Performance inefficiencies  (PASS_BY_VALUE)
/xmlhelp/source/cxxhelp/provider/content.cxx: 146 in <unnamed>::ResultSetForRootFactory::ResultSetForRootFactory(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>, com::sun::star::uno::Reference<com::sun::star::ucb::XContentProvider>, const com::sun::star::uno::Sequence<com::sun::star::beans::Property> &, chelp::URLParameter, chelp::Databases *)()


________________________________________________________________________________________________________
*** CID 1507490:  Performance inefficiencies  (PASS_BY_VALUE)
/xmlhelp/source/cxxhelp/provider/content.cxx: 146 in <unnamed>::ResultSetForRootFactory::ResultSetForRootFactory(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>, com::sun::star::uno::Reference<com::sun::star::ucb::XContentProvider>, const com::sun::star::uno::Sequence<com::sun::star::beans::Property> &, chelp::URLParameter, chelp::Databases *)()
140     public:
141     
142         ResultSetForRootFactory(
143             uno::Reference< uno::XComponentContext > xContext,
144             uno::Reference< ucb::XContentProvider > xProvider,
145             const uno::Sequence< beans::Property >& seq,
>>>     CID 1507490:  Performance inefficiencies  (PASS_BY_VALUE)
>>>     Passing parameter aURLParameter of type "chelp::URLParameter" (size 168 bytes) by value.
146             URLParameter aURLParameter,
147             Databases* pDatabases )
148             : m_xContext(std::move( xContext )),
149               m_xProvider(std::move( xProvider )),
150               m_seq( seq ),
151               m_aURLParameter(std::move( aURLParameter )),

** CID 1507489:  Performance inefficiencies  (PASS_BY_VALUE)
/xmlhelp/source/cxxhelp/provider/content.cxx: 183 in <unnamed>::ResultSetForQueryFactory::ResultSetForQueryFactory(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>, com::sun::star::uno::Reference<com::sun::star::ucb::XContentProvider>, const com::sun::star::uno::Sequence<com::sun::star::beans::Property> &, chelp::URLParameter, chelp::Databases *)()


________________________________________________________________________________________________________
*** CID 1507489:  Performance inefficiencies  (PASS_BY_VALUE)
/xmlhelp/source/cxxhelp/provider/content.cxx: 183 in <unnamed>::ResultSetForQueryFactory::ResultSetForQueryFactory(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>, com::sun::star::uno::Reference<com::sun::star::ucb::XContentProvider>, const com::sun::star::uno::Sequence<com::sun::star::beans::Property> &, chelp::URLParameter, chelp::Databases *)()
177     public:
178     
179         ResultSetForQueryFactory(
180             uno::Reference< uno::XComponentContext > xContext,
181             uno::Reference< ucb::XContentProvider > xProvider,
182             const uno::Sequence< beans::Property >& seq,
>>>     CID 1507489:  Performance inefficiencies  (PASS_BY_VALUE)
>>>     Passing parameter aURLParameter of type "chelp::URLParameter" (size 168 bytes) by value.
183             URLParameter aURLParameter,
184             Databases* pDatabases )
185             : m_xContext(std::move( xContext )),
186               m_xProvider(std::move( xProvider )),
187               m_seq( seq ),
188               m_aURLParameter(std::move( aURLParameter )),


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D41oP_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiwRhWcVKUElGaJiqf3pHiqrEQxXrWdw2BQ-2B2Fx0-2Fg-2BCsWy6CPZgyycnB3AN-2Fadg2RkpGcSWMvmu8X5jd3Kvd95tVKqwV2-2BJrI7i2yI5jrgrkrL56x312hxsqOXGq8tqSGZSU27zHjD1fphOPNEXmOo1HuJZCXEBTnDbk73iGO7O0-3D



More information about the LibreOffice mailing list