[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Sep 4 12:20:44 UTC 2018
sc/source/core/data/dptabres.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 6ee76d210846b84e93420a321c7908721ffe9e43
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 2 21:20:40 2018 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Sep 4 14:20:23 2018 +0200
ofz#10189 check container size
Change-Id: Ie99e3b082795989290799d057a99b1bcff94b161
Reviewed-on: https://gerrit.libreoffice.org/59913
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 2389e3d91dd0..e5198b4f2336 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -2863,10 +2863,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