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: https://origsvn.digium.com/svn/asterisk/trunk@84173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-10-01 15:23:19 +00:00
parent 9217a05b01
commit d78463be1e
14 changed files with 189 additions and 189 deletions

View File

@@ -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), ", ?");