[asterisk-commits] mmichelson: branch 12 r413282 - /branches/12/res/res_config_odbc.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 2 15:35:19 CDT 2014
Author: mmichelson
Date: Fri May 2 15:35:16 2014
New Revision: 413282
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=413282
Log:
Correct variable traversal logic in res_config_odbc's update_odbc function.
Closes issue ASTERISK-23675
Reported by Leando Dardini
Patches:
asterisk-23675-odbc-linkedlist-traversal_12.diff uploaded by Michael L. Young (license #5026)
Modified:
branches/12/res/res_config_odbc.c
Modified: branches/12/res/res_config_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_config_odbc.c?view=diff&rev=413282&r1=413281&r2=413282
==============================================================================
--- branches/12/res/res_config_odbc.c (original)
+++ branches/12/res/res_config_odbc.c Fri May 2 15:35:16 2014
@@ -490,7 +490,7 @@
}
snprintf(sql, sizeof(sql), "UPDATE %s SET ", table);
- while ((field = field->next)) {
+ while (field) {
if ((tableptr && (column = ast_odbc_find_column(tableptr, field->name))) || count >= 64) {
if (paramcount++) {
snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), ", ");
More information about the asterisk-commits
mailing list