Kaydet (Commit) 9fe857b7 authored tarafından Michael Stahl's avatar Michael Stahl

tdf#111934 xmloff: ODF import: self-referential conditional style crash

It's invalid input and also causes stack overflow.

Change-Id: Ie0b9dcaefcfcf254326151f345f4802ed66b994d
üst 49877dc9
...@@ -1659,6 +1659,11 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter) ...@@ -1659,6 +1659,11 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
{ {
SvXMLNumFormatContext* pStyle = const_cast<SvXMLNumFormatContext*>( static_cast<const SvXMLNumFormatContext *>(pStyles->FindStyleChildContext( SvXMLNumFormatContext* pStyle = const_cast<SvXMLNumFormatContext*>( static_cast<const SvXMLNumFormatContext *>(pStyles->FindStyleChildContext(
XML_STYLE_FAMILY_DATA_STYLE, aMyConditions[i].sMapName))); XML_STYLE_FAMILY_DATA_STYLE, aMyConditions[i].sMapName)));
if (this == pStyle)
{
SAL_INFO("xmloff.style", "invalid style:map references containing style");
pStyle = nullptr;
}
if (pStyle) if (pStyle)
{ {
if (pStyle->PrivateGetKey() > -1) // don't reset pStyle's bRemoveAfterUse flag if (pStyle->PrivateGetKey() > -1) // don't reset pStyle's bRemoveAfterUse flag
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment