[Freeswitch-svn] [commit] r13866 - freeswitch/trunk/src

FreeSWITCH SVN anthm at freeswitch.org
Fri Jun 19 10:23:57 PDT 2009


Author: anthm
Date: Fri Jun 19 12:23:57 2009
New Revision: 13866

Log:
FSCORE-384

Modified:
   freeswitch/trunk/src/switch_odbc.c

Modified: freeswitch/trunk/src/switch_odbc.c
==============================================================================
--- freeswitch/trunk/src/switch_odbc.c	(original)
+++ freeswitch/trunk/src/switch_odbc.c	Fri Jun 19 12:23:57 2009
@@ -388,12 +388,16 @@
 		switch_assert(names && vals);
 
 		for (x = 1; x <= c; x++) {
-			SQLSMALLINT NameLength, DataType, DecimalDigits, Nullable;
-			SQLULEN ColumnSize;
+			SQLSMALLINT NameLength = 0, DataType = 0, DecimalDigits = 0, Nullable = 0;
+			SQLULEN ColumnSize = 0;
 			names[y] = malloc(name_len);
 			memset(names[y], 0, name_len);
 
 			SQLDescribeCol(stmt, x, (SQLCHAR *) names[y], (SQLSMALLINT) name_len, &NameLength, &DataType, &ColumnSize, &DecimalDigits, &Nullable);
+
+			if (!ColumnSize) {
+				ColumnSize = 255;
+			}
 			ColumnSize++;
 
 			vals[y] = malloc(ColumnSize);



More information about the Freeswitch-svn mailing list