diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-15 00:19:54 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-15 00:34:57 -0500 |
commit | 1d4971d77afa492bfdbfd18113eff4f77b3100e3 (patch) | |
tree | a77aacb703b9e9c3dd95ea5ce466018f6a4da586 /sc | |
parent | 690e14ad035e642f4382d20b8b7b792762338126 (diff) |
Beware that the sequence can be empty.
And when it's empty, it causes an invalid array access later on.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/dptabres.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 84ce25806c84..c1a1824dd4a9 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -1369,6 +1369,10 @@ void ScDPResultMember::FillMemberResults( uno::Sequence<sheet::MemberResult>* pS // IsVisible() test is in ScDPResultDimension::FillMemberResults // (not on data layout dimension) + if (!pSequences->getLength()) + // empty sequence. Bail out. + return; + long nSize = GetSize(nMeasure); sheet::MemberResult* pArray = pSequences->getArray(); OSL_ENSURE( rPos+nSize <= pSequences->getLength(), "bumm" ); |