Kaydet (Commit) fe9cce94 authored tarafından Caolán McNamara's avatar Caolán McNamara

CID#1000697 out of bounds access

Change-Id: I59f80463aa13e3c28695112165343f93366cfec4
üst 74441e73
...@@ -585,7 +585,15 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet, ...@@ -585,7 +585,15 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
return false; return false;
} }
SwNumFmt aNumFmt = pNumRule->Get(static_cast<sal_uInt16>(pTxtNd->GetActualListLevel())); int nLevel = pTxtNd->GetActualListLevel();
if (nLevel < 0)
nLevel = 0;
if (nLevel >= MAXLEVEL)
nLevel = MAXLEVEL - 1;
SwNumFmt aNumFmt = pNumRule->Get(static_cast<sal_uInt16>(nLevel));
SwCharFmt * pCharFmt = SwCharFmt * pCharFmt =
pDoc->FindCharFmtByName(aNumFmt.GetCharFmtName()); pDoc->FindCharFmtByName(aNumFmt.GetCharFmtName());
......
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