[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Sat Sep 21 04:44:26 PDT 2013
sw/source/filter/ww8/ww8atr.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 60aea4b2cadf367736605b09604a0818b7ae571b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 21 12:42:38 2013 +0100
CID#736208 out of bounds access
Change-Id: I7f428106a4d64e2ee8990b2ddbe1a40a9ddd0a3e
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index c0a34c8..bc49164 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3317,7 +3317,15 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
if( pTxtNd->IsCountedInList())
{
- nLvl = static_cast< sal_uInt8 >(pTxtNd->GetActualListLevel());
+ int nLevel = pTxtNd->GetActualListLevel();
+
+ if (nLevel < 0)
+ nLevel = 0;
+
+ if (nLevel >= MAXLEVEL)
+ nLevel = MAXLEVEL - 1;
+
+ nLvl = static_cast< sal_uInt8 >(nLevel);
if ( pTxtNd->IsListRestart() )
{
More information about the Libreoffice-commits
mailing list