summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-10-31 16:26:14 +0100
committerEike Rathke <erack@redhat.com>2016-10-31 16:27:09 +0100
commit4f30849f07ea446cc58236e348737897adbbd016 (patch)
tree11a347c5ea714dc2f944cbfd1edc98b4ffa3f027 /sc
parenttdf#103591 icon theme name resolving, ui fixes, prioritize png (diff)
downloadcore-4f30849f07ea446cc58236e348737897adbbd016.tar.gz
core-4f30849f07ea446cc58236e348737897adbbd016.zip
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
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/table4.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index a5dd3e4e4c18..476d84fe8a0d 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;