[mapserver-commits] r7604 - branches/branch-5-0/mapserver

svn at osgeo.org svn at osgeo.org
Tue May 20 15:24:33 EDT 2008


Author: Assefa
Date: 2008-05-20 15:24:32 -0400 (Tue, 20 May 2008)
New Revision: 7604

Modified:
   branches/branch-5-0/mapserver/mapwms.c
Log:
wms setup with layers set to default might lead to memeory corruption #2622

Modified: branches/branch-5-0/mapserver/mapwms.c
===================================================================
--- branches/branch-5-0/mapserver/mapwms.c	2008-05-20 19:21:07 UTC (rev 7603)
+++ branches/branch-5-0/mapserver/mapwms.c	2008-05-20 19:24:32 UTC (rev 7604)
@@ -440,8 +440,11 @@
                   (map->name && strcasecmp(map->name, layers[k]) == 0) ||
                   (GET_LAYER(map, j)->group && strcasecmp(GET_LAYER(map, j)->group, layers[k]) == 0))
               {
-                  GET_LAYER(map, j)->status = MS_ON;
-                  map->layerorder[nLayerOrder++] = j;
+                  if (GET_LAYER(map, j)->status != MS_DEFAULT)
+                  {
+                      GET_LAYER(map, j)->status = MS_ON;
+                      map->layerorder[nLayerOrder++] = j;
+                  }
                   validlayers++;
                   layerfound = 1;
               }



More information about the mapserver-commits mailing list