[mapserver-commits] r8483 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Jan 30 16:07:45 EST 2009


Author: tamas
Date: 2009-01-30 16:07:45 -0500 (Fri, 30 Jan 2009)
New Revision: 8483

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/maplabel.c
Log:
Fixed msAddLabel may cause access violation in certain conditions

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-01-29 23:34:29 UTC (rev 8482)
+++ trunk/mapserver/HISTORY.TXT	2009-01-30 21:07:45 UTC (rev 8483)
@@ -12,6 +12,8 @@
 Current Version (5.3-dev, SVN trunk):
 ------------------------------------
 
+- Fixed msAddLabel may cause access violation in certain conditions
+
 - Changed base type of labelObj size, minsize and maxsize from int to double (#2766)
 
 - add support for WMS Server title in LAYER object (#885)

Modified: trunk/mapserver/maplabel.c
===================================================================
--- trunk/mapserver/maplabel.c	2009-01-29 23:34:29 UTC (rev 8482)
+++ trunk/mapserver/maplabel.c	2009-01-30 21:07:45 UTC (rev 8483)
@@ -318,6 +318,13 @@
   classObj *classPtr=NULL;
 
   if(!string) return(MS_SUCCESS); /* not an error */ 
+
+  layerPtr = (GET_LAYER(map, layerindex)); /* set up a few pointers for clarity */
+  classPtr = GET_LAYER(map, layerindex)->class[classindex];
+
+  if( label == NULL )
+      label = &(classPtr->label);
+
   if(map->scaledenom > 0) {
     if((label->maxscaledenom != -1) && (map->scaledenom >= label->maxscaledenom))
         return(MS_SUCCESS);
@@ -325,12 +332,6 @@
         return(MS_SUCCESS);
   }
 
-  layerPtr = (GET_LAYER(map, layerindex)); /* set up a few pointers for clarity */
-  classPtr = GET_LAYER(map, layerindex)->class[classindex];
-
-  if( label == NULL )
-      label = &(classPtr->label);
-
   /* Validate label priority value and get ref on label cache for it */
   if (label->priority < 1)
       label->priority = 1;



More information about the mapserver-commits mailing list