aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_config_odbc.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-01 15:23:19 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-01 15:23:19 +0000
commitdac373f5395aca9a9f3f75b089e415ec6f0a51f4 (patch)
tree5c5be0ea22d3b81ee644e5f620052a4f25f14e02 /res/res_config_odbc.c
parentb9f6c27beb072516a1bec8b7261b05ac902c2093 (diff)
Corydon posted this janitor project to the bug tracker and mvanbaak provided
a patch for it. It replaces a bunch of simple calls to snprintf with ast_copy_string (closes issue #10843) Reported by: Corydon76 Patches: 2007092900_10843.diff uploaded by mvanbaak (license 7) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84173 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_config_odbc.c')
-rw-r--r--res/res_config_odbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c
index 8455a07e5..344633cf2 100644
--- a/res/res_config_odbc.c
+++ b/res/res_config_odbc.c
@@ -496,7 +496,7 @@ static int store_odbc(const char *database, const char *table, va_list ap)
}
newval = va_arg(aq, const char *);
snprintf(keys, sizeof(keys), "%s", newparam);
- snprintf(vals, sizeof(vals), "?");
+ ast_copy_string(vals, "?", sizeof(vals));
while ((newparam = va_arg(aq, const char *))) {
snprintf(keys + strlen(keys), sizeof(keys) - strlen(keys), ", %s", newparam);
snprintf(vals + strlen(vals), sizeof(vals) - strlen(vals), ", ?");