[Libreoffice-commits] .: chart2/source

Jan Holesovsky kendy at kemper.freedesktop.org
Fri Mar 18 10:03:46 PDT 2011


 chart2/source/view/main/ChartItemPool.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2b268cbf2755cdce62b1fdfbc00a605b74b9a693
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Thu Mar 17 17:50:59 2011 +0000

    fix array bounds problem that crept in from OO.o

diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx
index 85faa64..2cdac8f 100644
--- a/chart2/source/view/main/ChartItemPool.cxx
+++ b/chart2/source/view/main/ChartItemPool.cxx
@@ -171,8 +171,8 @@ ChartItemPool::ChartItemPool():
     **************************************************************************/
     pItemInfos = new SfxItemInfo[SCHATTR_END - SCHATTR_START + 1];
 
-    sal_uInt16 i;
-    for( i = SCHATTR_START; i <= SCHATTR_END; i++ )
+    const sal_uInt16 nMax = SCHATTR_END - SCHATTR_START + 1;
+    for( sal_uInt16 i = 0; i < nMax; i++ )
     {
         pItemInfos[i]._nSID = 0;
         pItemInfos[i]._nFlags = SFX_ITEM_POOLABLE;


More information about the Libreoffice-commits mailing list