Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index



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.
24 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 1268298:  Logically dead code  (DEADCODE)
/sal/rtl/ustring.cxx: 577 in rtl_uString_newFromCodePoints()

** CID 1268299:  Logically dead code  (DEADCODE)
/sc/source/core/tool/grouparealistener.cxx: 193 in 
sc::FormulaGroupAreaListener::collectFormulaCells(int, int, std::vector<ScFormulaCell *, 
std::allocator<ScFormulaCell *>> &) const()

** CID 1268300:  Logically dead code  (DEADCODE)
/sc/source/core/tool/grouparealistener.cxx: 285 in sc::FormulaGroupAreaListener::getTopCell() 
const()

** CID 1268301:  Dereference null return value  (NULL_RETURNS)
/oox/source/export/shapes.cxx: 364 in 
oox::drawingml::ShapeExport::WriteCustomShape(com::sun::star::uno::Reference<com::sun::star::drawing::XShape>)()

** CID 1268297:  Logically dead code  (DEADCODE)
/sal/rtl/ustring.cxx: 953 in rtl_uString_internConvert()


________________________________________________________________________________________________________
*** CID 1268298:  Logically dead code  (DEADCODE)
/sal/rtl/ustring.cxx: 577 in rtl_uString_newFromCodePoints()
571         }
572         /* Builds on the assumption that sal_Int32 uses 32 bit two's complement
573            representation with wrap around (the necessary number of UTF-16 code
574            units will be no larger than 2 * SAL_MAX_INT32, represented as
575            sal_Int32 -2): */
576         if (n < 0) {
    CID 1268298:  Logically dead code  (DEADCODE)
    Execution cannot reach this statement: "*newString = NULL;".
577             *newString = NULL;
578             return;
579         }
580         *newString = rtl_uString_ImplAlloc(n);
581         if (*newString == NULL) {
582             return;

________________________________________________________________________________________________________
*** CID 1268299:  Logically dead code  (DEADCODE)
/sc/source/core/tool/grouparealistener.cxx: 193 in 
sc::FormulaGroupAreaListener::collectFormulaCells(int, int, std::vector<ScFormulaCell *, 
std::allocator<ScFormulaCell *>> &) const()
187                 " range " << maRange.Format(SCA_VALID) <<
188                 " mnTopCellRow " << mnTopCellRow << " length " << mnGroupLen);
189     
190         ScFormulaCell* const * pp = mpColumn->GetFormulaCellBlockAddress( mnTopCellRow);
191         assert(pp);
192         if (!pp)
    CID 1268299:  Logically dead code  (DEADCODE)
    Execution cannot reach this statement: "return;".
193             return;
194     
195         ScFormulaCell* const * ppEnd = pp + mnGroupLen;
196     
197         if (mbStartFixed)
198         {

________________________________________________________________________________________________________
*** CID 1268300:  Logically dead code  (DEADCODE)
/sc/source/core/tool/grouparealistener.cxx: 285 in sc::FormulaGroupAreaListener::getTopCell() 
const()
279     }
280     
281     const ScFormulaCell* FormulaGroupAreaListener::getTopCell() const
282     {
283         const ScFormulaCell* const * pp = mpColumn->GetFormulaCellBlockAddress( mnTopCellRow);
284         assert(pp);
    CID 1268300:  Logically dead code  (DEADCODE)
    Execution cannot reach the expression "NULL" inside this statement: "return pp ? *pp : 
NULL;".
285         return pp ? *pp : NULL;
286     }
287     
288     const ScRange& FormulaGroupAreaListener::getRange() const
289     {
290         return maRange;

________________________________________________________________________________________________________
*** CID 1268301:  Dereference null return value  (NULL_RETURNS)
/oox/source/export/shapes.cxx: 364 in 
oox::drawingml::ShapeExport::WriteCustomShape(com::sun::star::uno::Reference<com::sun::star::drawing::XShape>)()
358         Reference< XPropertySet > rXPropSet( xShape, UNO_QUERY );
359         bool bPredefinedHandlesUsed = true;
360         bool bHasHandles = false;
361         OUString sShapeType;
362         sal_uInt32 nMirrorFlags = 0;
363         MSO_SPT eShapeType = EscherPropertyContainer::GetCustomShapeType( xShape, nMirrorFlags, 
sShapeType );
    CID 1268301:  Dereference null return value  (NULL_RETURNS)
    Assigning: "pShape" = null return value from "GetSdrObjectFromXShape".
364         SdrObjCustomShape* pShape = static_cast<SdrObjCustomShape*>( GetSdrObjectFromXShape( 
xShape ) );
365         bool bIsDefaultObject = EscherPropertyContainer::IsDefaultObject( pShape, eShapeType );
366         const char* sPresetShape = msfilter::util::GetOOXMLPresetGeometry( USS( sShapeType ) );
367         DBG(fprintf(stderr, "custom shape type: %s ==> %s\n", USS( sShapeType ), sPresetShape));
368         Sequence< PropertyValue > aGeometrySeq;
369         sal_Int32 nAdjustmentValuesIndex = -1;

________________________________________________________________________________________________________
*** CID 1268297:  Logically dead code  (DEADCODE)
/sal/rtl/ustring.cxx: 953 in rtl_uString_internConvert()
947         }
948     
949         if ( len < 256 )
950         { // try various optimisations
951             sal_Int32 ulen;
952             if ( len < 0 )
    CID 1268297:  Logically dead code  (DEADCODE)
    Execution cannot reach this statement: "len = strlen(str);".
953                 len = strlen( str );
954             if ( eTextEncoding == RTL_TEXTENCODING_ASCII_US )
955             {
956                 int i;
957                 rtl_uString *pScratch;
958                 pScratch = static_cast< rtl_uString * >(


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/211?tab=overview

To manage Coverity Scan email notifications for "libreoffice@lists.freedesktop.org", click 
https://scan.coverity.com/subscriptions/edit?email=libreoffice%40lists.freedesktop.org&token=d6481d718a775246b2340f282ebe5939
 .


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.