[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Sep 4 11:31:38 UTC 2018
sc/source/core/data/dptabres.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 8767161e056b5d7fc8cf168d0541db86635d1041
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: Tue Sep 4 13:31:17 2018 +0200
ofz#10189 check container size
Change-Id: Ie99e3b082795989290799d057a99b1bcff94b161
Reviewed-on: https://gerrit.libreoffice.org/59912
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
Tested-by: Jenkins
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index c309a350bf59..38107b70e09f 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