Re: New Defects reported by Coverity Scan for LibreOffice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 12 of February 2022, scan-admin@xxxxxxxxxxxx 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@xxxxxxxxxxxxx



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux