[mapserver-commits] r12577 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Sat Sep 24 11:48:06 EDT 2011


Author: rouault
Date: 2011-09-24 08:48:06 -0700 (Sat, 24 Sep 2011)
New Revision: 12577

Modified:
   trunk/mapserver/mapwcs20.c
Log:
Use CSLTokenizeString2() to avoid mismatch between MapServer's memory allocation routines and GDAL's CSLDestroy() used to free params->ids (potential problems if mapserver and gdal build with different MSVC runtimes) (fixes r12550, #3925)

Modified: trunk/mapserver/mapwcs20.c
===================================================================
--- trunk/mapserver/mapwcs20.c	2011-09-24 15:01:15 UTC (rev 12576)
+++ trunk/mapserver/mapwcs20.c	2011-09-24 15:48:06 UTC (rev 12577)
@@ -1129,13 +1129,7 @@
                            "msWCSParseRequest20()");
                 return MS_FAILURE;
             }
-            tokens = msStringSplit(value, ',', &num);
-            params->ids = (char **) msSmallCalloc(num + 1, sizeof(char *));
-            for (j = 0; j < num; ++j)
-            {
-                params->ids[j] = msStrdup(tokens[j]);
-            }
-            msFreeCharArray(tokens, num);
+            params->ids = CSLTokenizeString2(value, ",",0);
         }
         else if (EQUAL(key, "FORMAT"))
         {



More information about the mapserver-commits mailing list