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

CID#736203 out of bounds access

Change-Id: I4db4e241b6b2348a48536a7dd0f1aecbf04cb675
üst 49325659
......@@ -2651,7 +2651,15 @@ sal_Bool SwTxtNode::HasNumber() const
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule )
{
SwNumFmt aFmt(pRule->Get( static_cast<sal_uInt16>(GetActualListLevel())));
int nLevel = GetActualListLevel();
if (nLevel < 0)
nLevel = 0;
if (nLevel >= MAXLEVEL)
nLevel = MAXLEVEL - 1;
SwNumFmt aFmt(pRule->Get(static_cast<sal_uInt16>(nLevel)));
// #i40041#
bResult = aFmt.IsEnumeration() &&
......
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