From f84c9164c5bfa438282c4264203163d4c6b7e689 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Tue, 23 Jan 2018 10:10:11 +0100 Subject: Assert that parameters are valid Follow-up for 3a2a430ae8e2c1647c18d8904477949f6e2e7941 Change-Id: I46a4f8a4528b73e4dcb01770af127ddea4000fdb Reviewed-on: https://gerrit.libreoffice.org/48382 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt --- sc/source/core/data/column.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sc') 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>& pObjects, SCROW nRowStart, SCROW nRowEnd) { + assert(static_cast(pObjects.size()) >= nRowEnd - nRowStart + 1); + int nObj = 0; for (SCROW nCurrentRow = nRowStart; nCurrentRow <= nRowEnd; nCurrentRow++, nObj++) { -- cgit