summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-09-02 21:20:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-09-03 10:00:36 +0200
commitfc5ab21dd326c28486e9cb668c50f417ab4455ee (patch)
treee8c894ac9721ed01c4dc8095f6c3bb894aab2f6b /sc/source
parent2e8cc2f51284163a35e0efe22497efb9bdf64317 (diff)
ofz#10189 check container size
Change-Id: Ie99e3b082795989290799d057a99b1bcff94b161 Reviewed-on: https://gerrit.libreoffice.org/59911 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/dptabres.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 30ee19333830..2e9e71df17ef 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -2862,10 +2862,14 @@ void ScDPResultDimension::LateInitFrom(
{
if ( rParams.IsEnd( nPos ) )
return;
- OSL_ENSURE( nPos <= pItemData.size(), OString::number(pItemData.size()).getStr() );
+ if (nPos >= pItemData.size())
+ {
+ SAL_WARN("sc.core", "pos " << nPos << ", but vector size is " << pItemData.size());
+ return;
+ }
+ SCROW rThisData = pItemData[nPos];
ScDPDimension* pThisDim = rParams.GetDim( nPos );
ScDPLevel* pThisLevel = rParams.GetLevel( nPos );
- SCROW rThisData = pItemData[nPos];
if (!pThisDim || !pThisLevel)
return;