[mapserver-commits] r10730 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Nov 15 13:48:42 EST 2010


Author: aboudreault
Date: 2010-11-15 10:48:42 -0800 (Mon, 15 Nov 2010)
New Revision: 10730

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapfile.c
Log:
Fixed free(): invalid next size in mapfile.c (#3604)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2010-11-14 19:55:02 UTC (rev 10729)
+++ trunk/mapserver/HISTORY.TXT	2010-11-15 18:48:42 UTC (rev 10730)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Fixed free(): invalid next size in mapfile.c (#3604)
+
 - Added a built-in OpenLayers map viewer (#3549)
 
 - Fixed issues with static buffers and sprintf (#3537)

Modified: trunk/mapserver/mapfile.c
===================================================================
--- trunk/mapserver/mapfile.c	2010-11-14 19:55:02 UTC (rev 10729)
+++ trunk/mapserver/mapfile.c	2010-11-15 18:48:42 UTC (rev 10730)
@@ -5686,7 +5686,7 @@
     const char *defaultkey = msFirstKeyFromHashTable(&(layer->metadata));
     while(defaultkey) {
       if(!strncmp(defaultkey,"default_",8)){
-          size_t buffer_size = (strlen(defaultkey)-8)+1;
+          size_t buffer_size = (strlen(defaultkey)-5);
         char *tmpstr = (char *)malloc(buffer_size);
         snprintf(tmpstr, buffer_size, "%%%s%%", &(defaultkey[8]));
 



More information about the mapserver-commits mailing list