New Defects reported by Coverity Scan for LibreOffice
Luboš Luňák
l.lunak at collabora.com
Mon Feb 14 07:25:10 UTC 2022
On Saturday 12 of February 2022, scan-admin at coverity.com wrote:
> /sc/source/core/data/fillinfo.cxx: 253 in <unnamed>::initCellInfo(RowInfo
> *, unsigned long, short, const SvxShadowItem *)() 247 {
> 248 RowInfo& rThisRowInfo = pRowInfo[nArrRow];
> 249 rThisRowInfo.allocCellInfo( nRotMax + 1 );
> 250
> 251 for (SCCOL nCol = -1; nCol <= nRotMax+1; ++nCol) //
> Preassign cell info 252 {
>
> >>> CID 1498148: Integer handling issues (NEGATIVE_RETURNS)
> >>> "nCol" is passed to a parameter that cannot be negative.
>
> 253 CellInfo& rInfo = rThisRowInfo.cellInfo(nCol);
Any idea what this is about? It's RowInfo::cellInfo(SCCOL), and SCCOL is
sal_Int16, so the parameter can be negative. Does Coverity somehow know that
SCCOL under normal circumstances should not be negative?
--
Luboš Luňák
l.lunak at collabora.com
More information about the LibreOffice
mailing list