[svn-commits] tilghman: branch 1.6.2 r310141 - in /branches/1.6.2: ./ apps/ funcs/ res/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 9 23:51:41 CST 2011


Author: tilghman
Date: Wed Mar  9 23:51:37 2011
New Revision: 310141

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=310141
Log:
Merged revisions 310140 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r310140 | tilghman | 2011-03-09 23:38:44 -0600 (Wed, 09 Mar 2011) | 5 lines
  
  Initialize column size to 0 to deal with a potential UnixODBC bug on 64-bit systems.
  
  (closes issue #18295)
   Reported by: pruiz
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/apps/app_voicemail.c
    branches/1.6.2/funcs/func_odbc.c
    branches/1.6.2/res/res_config_odbc.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: branches/1.6.2/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/apps/app_voicemail.c?view=diff&rev=310141&r1=310140&r2=310141
==============================================================================
--- branches/1.6.2/apps/app_voicemail.c (original)
+++ branches/1.6.2/apps/app_voicemail.c Wed Mar  9 23:51:37 2011
@@ -3182,6 +3182,7 @@
 			fprintf(f, "[message]\n");
 		for (x=0;x<colcount;x++) {
 			rowdata[0] = '\0';
+			colsize = 0;
 			collen = sizeof(coltitle);
 			res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen, 
 						&datatype, &colsize, &decimaldigits, &nullable);

Modified: branches/1.6.2/funcs/func_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/funcs/func_odbc.c?view=diff&rev=310141&r1=310140&r2=310141
==============================================================================
--- branches/1.6.2/funcs/func_odbc.c (original)
+++ branches/1.6.2/funcs/func_odbc.c Wed Mar  9 23:51:37 2011
@@ -559,7 +559,7 @@
 
 			if (y == 0) {
 				char colname[256];
-				SQLULEN maxcol;
+				SQLULEN maxcol = 0;
 
 				res = SQLDescribeCol(stmt, x + 1, (unsigned char *)colname, sizeof(colname), &collength, NULL, &maxcol, NULL, NULL);
 				ast_debug(3, "Got collength of %d and maxcol of %d for column '%s' (offset %d)\n", (int)collength, (int)maxcol, colname, x);
@@ -1152,6 +1152,8 @@
 			}
 			for (;;) {
 				for (x = 0; x < colcount; x++) {
+					maxcol = 0;
+
 					res = SQLDescribeCol(stmt, x + 1, (unsigned char *)colname, sizeof(colname), &collength, NULL, &maxcol, NULL, NULL);
 					if (((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) || collength == 0) {
 						snprintf(colname, sizeof(colname), "field%d", x);

Modified: branches/1.6.2/res/res_config_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/res/res_config_odbc.c?view=diff&rev=310141&r1=310140&r2=310141
==============================================================================
--- branches/1.6.2/res/res_config_odbc.c (original)
+++ branches/1.6.2/res/res_config_odbc.c Wed Mar  9 23:51:37 2011
@@ -237,6 +237,7 @@
 	}
 	for (x = 0; x < colcount; x++) {
 		rowdata[0] = '\0';
+		colsize = 0;
 		collen = sizeof(coltitle);
 		res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen, 
 					&datatype, &colsize, &decimaldigits, &nullable);
@@ -408,6 +409,7 @@
 		}
 		for (x=0;x<colcount;x++) {
 			rowdata[0] = '\0';
+			colsize = 0;
 			collen = sizeof(coltitle);
 			res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen, 
 						&datatype, &colsize, &decimaldigits, &nullable);




More information about the svn-commits mailing list