[asterisk-commits] tilghman: trunk r58480 - in /trunk: ./ res/res_odbc.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Mar 8 14:34:41 MST 2007


Author: tilghman
Date: Thu Mar  8 15:34:40 2007
New Revision: 58480

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

........
r58479 | tilghman | 2007-03-08 15:33:03 -0600 (Thu, 08 Mar 2007) | 2 lines

Fix segfault (Issue 9236)

........

Modified:
    trunk/   (props changed)
    trunk/res/res_odbc.c

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

Modified: trunk/res/res_odbc.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_odbc.c?view=diff&rev=58480&r1=58479&r2=58480
==============================================================================
--- trunk/res/res_odbc.c (original)
+++ trunk/res/res_odbc.c Thu Mar  8 15:34:40 2007
@@ -97,7 +97,7 @@
 			if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO) && (res != SQL_NO_DATA)) {
 				if (res == SQL_ERROR) {
 					SQLGetDiagField(SQL_HANDLE_STMT, stmt, 1, SQL_DIAG_NUMBER, &numfields, SQL_IS_INTEGER, &diagbytes);
-					for (i=0; i< numfields + 1; i++) {
+					for (i = 0; i < numfields; i++) {
 						SQLGetDiagRec(SQL_HANDLE_STMT, stmt, i + 1, state, &nativeerror, diagnostic, sizeof(diagnostic), &diagbytes);
 						ast_log(LOG_WARNING, "SQL Execute returned an error %d: %s: %s (%d)\n", res, state, diagnostic, diagbytes);
 						if (i > 10) {



More information about the asterisk-commits mailing list