diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-03-08 21:34:40 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-03-08 21:34:40 +0000 |
commit | 207c34f2d63860fca9f3126ba1aea57198168653 (patch) | |
tree | 2a26f7b54048a3e657184526879495f32498f4fe /res/res_odbc.c | |
parent | da28f77d4a9b8a14434395a7e957f3ba0597cb50 (diff) |
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)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_odbc.c')
-rw-r--r-- | res/res_odbc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_odbc.c b/res/res_odbc.c index 6f9f8a2df..a5aefa7df 100644 --- a/res/res_odbc.c +++ b/res/res_odbc.c @@ -97,7 +97,7 @@ SQLHSTMT ast_odbc_prepare_and_execute(struct odbc_obj *obj, SQLHSTMT (*prepare_c 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) { |