[mapserver-commits] r11867 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Sat Jul 2 11:50:35 EDT 2011


Author: rouault
Date: 2011-07-02 08:50:34 -0700 (Sat, 02 Jul 2011)
New Revision: 11867

Modified:
   trunk/mapserver/mapprojhack.c
Log:
make sure that string is always nul-terminated

Modified: trunk/mapserver/mapprojhack.c
===================================================================
--- trunk/mapserver/mapprojhack.c	2011-07-02 15:48:28 UTC (rev 11866)
+++ trunk/mapserver/mapprojhack.c	2011-07-02 15:50:34 UTC (rev 11867)
@@ -111,8 +111,8 @@
         char *blank;
         double to_meter;
 
-        strncpy(to_meter_str,(strstr(proj_str,"to_meter=")+9),
-                sizeof(to_meter_str)-2);
+        strlcpy(to_meter_str,(strstr(proj_str,"to_meter=")+9),
+                sizeof(to_meter_str));
         pj_dalloc( proj_str );
 
         blank = strchr(to_meter_str, ' ');



More information about the mapserver-commits mailing list