summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2016-05-31 10:42:06 +0200
committerMichael Meeks <michael.meeks@collabora.com>2016-06-01 09:11:49 +0000
commit35dd224accca2a4a02a3d93ef460b91b5416fec2 (patch)
treebca8b128cc041dc38916cc6d94d28b23a50e72b8
parented043775b0789942c58baa2ba6c53959dcfb1807 (diff)
tdf#84411 - OpenCL: S/W interpreter throws std::out_of_range error
The problem is that in a array fragment, row start can be beyond data row end. Change-Id: I33658c87c21d1be237f4675241e3eabdd4ec7058 Reviewed-on: https://gerrit.libreoffice.org/25734 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--sc/source/core/tool/scmatrix.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 1689809bc4e2..4aa0993f365a 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -3362,6 +3362,10 @@ void ScVectorRefMatrix::ensureFullMatrix()
size_t nRowSize = mnRowSize;
size_t nRowEnd = mnRowStart + mnRowSize;
size_t nDataRowEnd = mpToken->GetArrayLength();
+
+ if (mnRowStart >= nDataRowEnd)
+ return;
+
if (nRowEnd > nDataRowEnd)
{
// Data array is shorter than the row size of the reference. Truncate