summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-07-02 09:24:09 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-07-02 13:19:33 -0400
commitb8904b25d622bcf5c2b1435a993e507d1c7f7555 (patch)
tree106f4f913a2672e7274acfa48443a1c135d3b095 /sc
parentcd2594c7504318a88719c710f7e627b9dd72fa16 (diff)
Try not to iterate beyond the end of the formula block.
Or else a crash would ensue... Change-Id: Ib08163ba91e4bac023ae778c704a0c052fa48ebb
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/column2.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index abe2806d3a53..4becbb750358 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -2258,8 +2258,9 @@ const double* ScColumn::FetchDoubleArray( sc::FormulaGroupContext& rCxt, SCROW n
return &rArray[0];
}
+ // Requested length goes beyond a single block. Fill the array
+ // with the content of this formula block first.
itEnd = sc::formula_block::end(*aPos.first->data);
- std::advance(itEnd, nLenRequested);
for (; it != itEnd; ++it)
{
ScFormulaCell& rCell = **it;