sc/source/core/data/table4.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit f748f8173c0a7f539a174a09a141e58b468bf92c Author: Eike Rathke <er...@redhat.com> Date: Mon Oct 31 16:26:14 2016 +0100 don't loop uint16 against size Theoretically selecting over 64k rows with a series sequence and calling Fill could had looped endless. Change-Id: I1740b674638eb90d51808e619c562cf8064f4888 (cherry picked from commit 4f30849f07ea446cc58236e348737897adbbd016) Reviewed-on: https://gerrit.libreoffice.org/30446 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 016b8e6..19c537e 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -294,7 +294,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, nCol = sal::static_int_cast<SCCOL>( nCol + nAddX ); nRow = sal::static_int_cast<SCROW>( nRow + nAddY ); bool bVal = true; - for (sal_uInt16 i=1; i<nCount && bVal; i++) + for (SCSIZE i=1; i<nCount && bVal; i++) { ScRefCellValue aCell = GetCellValue(nCol,nRow); if (aCell.meType == CELLTYPE_VALUE) @@ -351,7 +351,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, nCol = sal::static_int_cast<SCCOL>( nCol + nAddX ); nRow = sal::static_int_cast<SCROW>( nRow + nAddY ); bool bVal = true; - for (sal_uInt16 i=1; i<nCount && bVal; i++) + for (SCSIZE i=1; i<nCount && bVal; i++) { ScRefCellValue aCell = GetCellValue(nCol,nRow); if (aCell.meType == CELLTYPE_VALUE) @@ -399,7 +399,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, (void)rListData->GetSubIndex(aStr, rListIndex, bMatchCase); nCol = sal::static_int_cast<SCCOL>( nCol + nAddX ); nRow = sal::static_int_cast<SCROW>( nRow + nAddY ); - for (sal_uInt16 i=1; i<nCount && rListData; i++) + for (SCSIZE i=1; i<nCount && rListData; i++) { (void)GetString(nCol, nRow, aStr); if (!rListData->GetSubIndex(aStr, rListIndex, bMatchCase)) @@ -426,7 +426,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, nCol = sal::static_int_cast<SCCOL>( nCol + nAddX ); nRow = sal::static_int_cast<SCROW>( nRow + nAddY ); bool bVal = true; - for (sal_uInt16 i=1; i<nCount && bVal; i++) + for (SCSIZE i=1; i<nCount && bVal; i++) { ScRefCellValue aCell = GetCellValue(nCol, nRow); CellType eType = aCell.meType; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits