[mapserver-commits] r7977 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Sun Oct 12 17:56:59 EDT 2008


Author: tamas
Date: 2008-10-12 17:56:59 -0400 (Sun, 12 Oct 2008)
New Revision: 7977

Modified:
   trunk/mapserver/mapmssql2008.c
Log:
Fixed msMSSQL2008LayerGetItems to retrieve the column names properly (#2791)

Modified: trunk/mapserver/mapmssql2008.c
===================================================================
--- trunk/mapserver/mapmssql2008.c	2008-10-12 19:17:23 UTC (rev 7976)
+++ trunk/mapserver/mapmssql2008.c	2008-10-12 21:56:59 UTC (rev 7977)
@@ -297,6 +297,10 @@
 
     if (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO)
     {
+        if (bufferLength < SQL_COLUMN_NAME_MAX_LENGTH + 1)
+            strncpy(buffer, columnName, bufferLength);
+        else
+            strncpy(buffer, columnName, SQL_COLUMN_NAME_MAX_LENGTH + 1);
         return 1;
     }
     else



More information about the mapserver-commits mailing list