summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-08-22 13:38:03 +0200
committerEike Rathke <erack@redhat.com>2017-08-22 13:40:09 +0200
commitcc2cb0123ac599bf25c5e17b97b5d7bf93d3e487 (patch)
tree849e012b496ebe019790e45e6c8bdd592e903437
parent3976f115ef539171e4b165c8d610ab7b49764f15 (diff)
Assert that caller columns are within bounds
Change-Id: Icf93bb5d57c9a4b6988a2ea34fc3ca23130d7eeb
-rw-r--r--sc/source/core/tool/scmatrix.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 8bea64987705..6e0e9bb7b69b 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -1277,7 +1277,10 @@ public:
mnStartIndex( nCol1 * aSize.row ),
mnStopIndex( (nCol2 + 1) * aSize.row ),
mnResult(ResultNotSet),
- mnIndex(0) {}
+ mnIndex(0)
+ {
+ assert( nCol1 < aSize.column && nCol2 < aSize.column);
+ }
size_t getMatching() const { return mnResult; }