[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - writerfilter/source

Fridrich Å trba fridrich.strba at bluewin.ch
Thu May 2 05:33:10 PDT 2013


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

New commits:
commit f98dcf9b07ee5ce6e2a241679086b1326072a28d
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
    (cherry picked from commit 4314e6548356a5d2f1dc45e2aa501e37bd5a794e)
    Reviewed-on: https://gerrit.libreoffice.org/3739
    Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat at free.fr>
    Tested-by: Bosdonnat Cedric <cedric.bosdonnat at free.fr>

diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 470cb0c..0cd9138 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -492,7 +492,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