New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Mon Jan 25 10:56:08 UTC 2021


Hi,

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

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
1 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 1 of 1 defect(s)


** CID 1472493:  Integer handling issues  (SIGN_EXTENSION)
/sc/source/core/data/table2.cxx: 4006 in ScTable::GetRowForHeight(unsigned long) const()


________________________________________________________________________________________________________
*** CID 1472493:  Integer handling issues  (SIGN_EXTENSION)
/sc/source/core/data/table2.cxx: 4006 in ScTable::GetRowForHeight(unsigned long) const()
4000             SCROW nLastCommon = std::min(aData.mnRow2, aRowHeightRange.mnRow2);
4001             assert (nLastCommon >= nRow);
4002             SCROW nCommon = nLastCommon - nRow + 1;
4003     
4004             // how much further to go ?
4005             sal_uLong nPixelsLeft = nHeight - nSum;
>>>     CID 1472493:  Integer handling issues  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "aRowHeightRange.mnValue" with type "sal_uInt16" (16 bits, unsigned) is promoted in "aRowHeightRange.mnValue * nCommon" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned).  If "aRowHeightRange.mnValue * nCommon" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
4006             sal_uLong nCommonPixels = aRowHeightRange.mnValue * nCommon;
4007     
4008             // are we in the zone ?
4009             if (nCommonPixels > nPixelsLeft)
4010             {
4011                 nRow += (nPixelsLeft + aRowHeightRange.mnValue - 1) / aRowHeightRange.mnValue;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DXYXv_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJie07jXsGeBWccWlwrcSU65nvevvmNa5neYsm98tXlcp-2BS18mbmiQmZ5Qp3GFNA6tXMnjCMufEPLmow9j3kj5T0zzTTKK1CBN9XTPR97T6X7DUiqVWRFR3-2Fk9dBJVl8I80H52VahitctUlIpbqqyvV-2B7S3nCF0ov2mZAAzma-2Fj9zcK6aMh-2FzVVElCBJdLxcCnD



More information about the LibreOffice mailing list