[Libreoffice-commits] core.git: writerfilter/source

Fridrich Å trba fridrich.strba at bluewin.ch
Thu May 2 03:58:26 PDT 2013


 writerfilter/source/dmapper/NumberingManager.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4314e6548356a5d2f1dc45e2aa501e37bd5a794e
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Thu May 2 12:57:40 2013 +0200

    Fix out-of-bonds Sequence access in NumberingManager with page numbering
    
    Change-Id: Ib35fcee1605215fb22ae9838b29fe1d8be5eaf58

diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 9308d82..3c6019d 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -527,7 +527,8 @@ uno::Sequence< uno::Sequence< beans::PropertyValue > > ListDef::GetPropertyValue
 
     // Merge the results of [2] in [1]
     sal_Int32 nThisCount = aThis.getLength( );
-    for ( sal_Int32 i = 0; i < nThisCount; i++ )
+    sal_Int32 nAbstractCount = aAbstract.getLength( );
+    for ( sal_Int32 i = 0; i < nThisCount && i < nAbstractCount; i++ )
     {
         uno::Sequence< beans::PropertyValue > level = aThis[i];
         if ( level.hasElements() )


More information about the Libreoffice-commits mailing list