[mapserver-commits] r10961 - branches/branch-5-6/mapserver

svn at osgeo.org svn at osgeo.org
Mon Feb 7 12:03:05 EST 2011


Author: dmorissette
Date: 2011-02-07 09:03:05 -0800 (Mon, 07 Feb 2011)
New Revision: 10961

Modified:
   branches/branch-5-6/mapserver/HISTORY.TXT
   branches/branch-5-6/mapserver/mapogr.cpp
Log:
Fixed possible seg. fault when using OGR:Label* special attributes (#3667)

Modified: branches/branch-5-6/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-6/mapserver/HISTORY.TXT	2011-02-07 15:16:48 UTC (rev 10960)
+++ branches/branch-5-6/mapserver/HISTORY.TXT	2011-02-07 17:03:05 UTC (rev 10961)
@@ -14,7 +14,7 @@
 Version 5.6.7 (SVN branch-5-6):
 ---------------------------
 
-- ...
+- Fixed possible seg. fault when using "OGR:Label*" special attributes (#3667)
 
 Version 5.6.6 (2011-01-17):
 ---------------------------

Modified: branches/branch-5-6/mapserver/mapogr.cpp
===================================================================
--- branches/branch-5-6/mapserver/mapogr.cpp	2011-02-07 15:16:48 UTC (rev 10960)
+++ branches/branch-5-6/mapserver/mapogr.cpp	2011-02-07 17:03:05 UTC (rev 10961)
@@ -599,7 +599,10 @@
             if (hStylePart && OGR_ST_GetType(hStylePart) == OGRSTCLabel)
                 hLabelStyle = hStylePart;
             else if (hStylePart)
+            {
                 OGR_ST_Destroy(hStylePart);
+                hStylePart =  NULL;
+            }
 
           /* Setting up the size units according to msOGRLayerGetAutoStyle*/
           if (hStylePart && layer->map)
@@ -897,7 +900,10 @@
         if (poStylePart && poStylePart->GetType() == OGRSTCLabel)
             poLabelStyle = (OGRStyleLabel*)poStylePart;
         else if (poStylePart)
+        {
             delete poStylePart;
+            poStylePart = NULL;
+        }
         /* Setting up the size units according to msOGRLayerGetAutoStyle*/
         if (poStylePart && layer->map)
             poStylePart->SetUnit(OGRSTUPixel, layer->map->cellsize*72.0*39.37);



More information about the mapserver-commits mailing list