[Libreoffice-commits] core.git: sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Sep 3 08:00:56 UTC 2018
sc/source/core/data/dptabres.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit fc5ab21dd326c28486e9cb668c50f417ab4455ee
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 2 21:20:40 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 3 10:00:36 2018 +0200
ofz#10189 check container size
Change-Id: Ie99e3b082795989290799d057a99b1bcff94b161
Reviewed-on: https://gerrit.libreoffice.org/59911
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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;
More information about the Libreoffice-commits
mailing list