[mapserver-commits] r7978 - branches/branch-5-2/mapserver

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


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

Modified:
   branches/branch-5-2/mapserver/mapmssql2008.c
Log:
Fixed msMSSQL2008LayerGetItems to retrieve the column names properly (#2791)

Modified: branches/branch-5-2/mapserver/mapmssql2008.c
===================================================================
--- branches/branch-5-2/mapserver/mapmssql2008.c	2008-10-12 21:56:59 UTC (rev 7977)
+++ branches/branch-5-2/mapserver/mapmssql2008.c	2008-10-12 21:59:47 UTC (rev 7978)
@@ -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