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

Markus Mohrhard markus.mohrhard at collabora.co.uk
Tue Mar 4 12:28:12 PST 2014


 oox/source/drawingml/shapepropertymap.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 467ca9e9e175e328c9d99b94625110a4b6ce591d
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Mar 4 21:26:00 2014 +0100

    better safe than sorry
    
    Change-Id: I1e22f166381b3bc8122b3bbef7fc760705e402d1

diff --git a/oox/source/drawingml/shapepropertymap.cxx b/oox/source/drawingml/shapepropertymap.cxx
index 446282b..f14b653 100644
--- a/oox/source/drawingml/shapepropertymap.cxx
+++ b/oox/source/drawingml/shapepropertymap.cxx
@@ -63,7 +63,7 @@ ShapePropertyInfo::ShapePropertyInfo( const sal_Int32* pnPropertyIds,
     mbNamedFillBitmapUrl( bNamedFillBitmapUrl )
 {
     assert(pnPropertyIds);
-    for(size_t i = 0;; ++i)
+    for(size_t i = 0; i < PROP_COUNT; ++i) // normally we should not reach PROP_COUNT but it prevents infinite loops if we hit a bug
     {
         if(pnPropertyIds[i] == PROP_END_LIST)
             break;


More information about the Libreoffice-commits mailing list