List:Commits« Previous MessageNext Message »
From:kboortz Date:September 19 2007 3:34pm
Subject:Connector/ODBC 3.51 commit: r794 - trunk/driver
View as plain text  
Modified:
   trunk/driver/info.c
Log:
Let SQLGetFunctions() clear vector memory before setting values (bug#31055)


Modified: trunk/driver/info.c
===================================================================
--- trunk/driver/info.c	2007-09-19 12:48:40 UTC (rev 793)
+++ trunk/driver/info.c	2007-09-19 15:34:47 UTC (rev 794)
@@ -1234,6 +1234,9 @@
 
   if (fFunction == SQL_API_ODBC3_ALL_FUNCTIONS)
   {
+    /* Clear and set bits in the 4000 bit vector */
+    memset(pfExists, 0,
+           sizeof(SQLUSMALLINT) * SQL_API_ODBC3_ALL_FUNCTIONS_SIZE);
     for (index= 0; index < myodbc_func_size; index++)
     {
       SQLUSMALLINT id= myodbc3_functions[index];
@@ -1244,6 +1247,8 @@
 
   if (fFunction == SQL_API_ALL_FUNCTIONS)
   {
+    /* Clear and set elements in the SQLUSMALLINT 100 element array */
+    memset(pfExists, 0, sizeof(SQLUSMALLINT) * 100);
     for (index= 0; index < myodbc_func_size; index++)
     {
       if (myodbc3_functions[index] < 100)

Thread
Connector/ODBC 3.51 commit: r794 - trunk/driverkboortz19 Sep