aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_odbc.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-28 03:38:09 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-28 03:38:09 +0000
commit62f1e35c8b527bd48aa7c352c639d25e932ff182 (patch)
tree4eb543065ac6830cc089acbabd138f19de1abc41 /res/res_odbc.c
parentd9ecee6a3c374893b977bb4d21860cc97470f675 (diff)
Another crash that I thought we had fixed already - Issue 9396
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@59289 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_odbc.c')
-rw-r--r--res/res_odbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_odbc.c b/res/res_odbc.c
index 2c1137cbe..328a811dc 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -142,7 +142,7 @@ int ast_odbc_smart_execute(struct odbc_obj *obj, SQLHSTMT stmt)
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) {