diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2016-05-31 10:42:06 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-05-31 19:52:39 +0000 |
commit | a97f9c5790b4751098b0c3f78a387fbff36582a6 (patch) | |
tree | ed24afcb5208811fa86cd355d52c7cf12fc1cb90 | |
parent | 2518935003b879fdfe30cf278b46f4e3a00f3576 (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/25728
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | sc/source/core/tool/scmatrix.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index 47652d25e473..c70bf7188347 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -3065,6 +3065,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 |