[mapserver-commits] r11055 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Mar 3 17:15:46 EST 2011


Author: rouault
Date: 2011-03-03 14:15:46 -0800 (Thu, 03 Mar 2011)
New Revision: 11055

Modified:
   trunk/mapserver/mapows.c
Log:
avoid reading 1 byte after the end of string

Modified: trunk/mapserver/mapows.c
===================================================================
--- trunk/mapserver/mapows.c	2011-03-03 22:15:08 UTC (rev 11054)
+++ trunk/mapserver/mapows.c	2011-03-03 22:15:46 UTC (rev 11055)
@@ -221,7 +221,7 @@
             disableFlag = MS_TRUE;
             continue;
         }
-        else if ( (*ptr == ' ') || (ptr[1] == '\0')) { /* end of word */
+        else if ( (*ptr == ' ') || (*ptr != '\0' && ptr[1] == '\0')) { /* end of word */
             if (ptr[1] == '\0') {
                 *bufferPtr = *ptr;
                 ++bufferPtr;



More information about the mapserver-commits mailing list