aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-07 22:03:50 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-07 22:03:50 +0000
commitb19af8bce9dca25f1f5dc9ccdad95a0ee5acd94d (patch)
tree88394384a8e883d3375efe7df8c1a35ea0be66a8 /funcs
parent9483417f74682ec0d479ee4cd7251133f3e0138d (diff)
Two bugs relating to colnames found by Marquis42 on #asterisk-dev
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155395 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_odbc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index 23cc4f843..e0f4eb302 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -376,6 +376,8 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
return -1;
}
+ ast_str_reset(colnames);
+
AST_RWLIST_RDLOCK(&queries);
AST_RWLIST_TRAVERSE(&queries, query, list) {
if (!strcmp(query->acf->name, cmd)) {
@@ -531,6 +533,7 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
colnames->str[colnames->used++] = colname[i];
if (colname[i] == '\0') {
+ colnames->used--;
break;
}
}