Kaydet (Commit) 0d4ee442 authored tarafından Michael Stahl's avatar Michael Stahl

fdo#61309: writerfilter: filter out enormous numbering levels

Change-Id: Iafef1c2ca2ca072bd604946fbe19b6a24e323512
üst b440cfcc
......@@ -535,6 +535,11 @@ throw (lang::IllegalArgumentException)
sal_Int16 nLevel = 0;
if (rValue >>= nLevel)
{
if (nLevel < 0 || MAXLEVEL <= nLevel)
{
throw lang::IllegalArgumentException(
"invalid NumberingLevel", 0, 0);
}
pTxtNd->SetAttrListLevel(nLevel);
}
}
......
......@@ -1540,7 +1540,12 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
case NS_sprm::LN_PBrcp:
break; // sprmPBrcp
case NS_sprm::LN_PIlvl: // sprmPIlvl
//todo: Numbering level will be implemented in the near future (OOo 3.0?)
if (nIntValue < 0 || 10 <= nIntValue) // Writer can't do everything
{
SAL_INFO("writerfilter",
"unsupported numbering level " << nIntValue);
break;
}
if( m_pImpl->IsStyleSheetImport() )
{
//style sheets cannot have a numbering rule attached
......
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