[REVIEW 3-6][REVIEW 3-6-0] prevent crash in malformed pivot table loaded from .xls

Stephan Bergmann sbergman at redhat.com
Tue Jul 24 05:26:58 PDT 2012


On 07/24/2012 11:31 AM, Eike Rathke wrote:
> Please review and cherry-pick to 3-6 and 3-6-0
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=3536fcd999f16525f20a1fff5c2512b565511d7b

> diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
> index 8b7d6f8..039fa58 100644
> --- a/sc/source/core/data/dptabsrc.cxx
> +++ b/sc/source/core/data/dptabsrc.cxx
> @@ -2577,7 +2577,8 @@ bool ScDPMember::IsNamedItem(SCROW nIndex) const
> (long)::rtl::math::approxFloor( pData->GetValue() ),
> nHier, nLev );
> // fValue is converted from integer, so simple comparison works
> - return nComp == GetItemData().GetValue();
> + const ScDPItemData* pData2 = GetItemData();
> + return pData && nComp == pData2->GetValue();

that should be return pData2 && ..., right?

Stephan

> }
> }


More information about the LibreOffice mailing list