diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-01-23 10:10:11 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-01-25 08:39:32 +0100 |
commit | f84c9164c5bfa438282c4264203163d4c6b7e689 (patch) | |
tree | 61eba57171ae1dc5463312e8260ff89c1480f9db /sc | |
parent | fbf42a4f13dd3ad9f70fc9f434e3cb6236f38300 (diff) |
Assert that parameters are valid
Follow-up for 3a2a430ae8e2c1647c18d8904477949f6e2e7941
Change-Id: I46a4f8a4528b73e4dcb01770af127ddea4000fdb
Reviewed-on: https://gerrit.libreoffice.org/48382
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/column.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index a9b074458af8..24d825901483 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -1896,6 +1896,8 @@ void ScColumn::UpdateNoteCaptions( SCROW nRow1, SCROW nRow2 ) void ScColumn::UpdateDrawObjects(std::vector<std::vector<SdrObject*>>& pObjects, SCROW nRowStart, SCROW nRowEnd) { + assert(static_cast<int>(pObjects.size()) >= nRowEnd - nRowStart + 1); + int nObj = 0; for (SCROW nCurrentRow = nRowStart; nCurrentRow <= nRowEnd; nCurrentRow++, nObj++) { |