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

@@ -1880,7 +1880,7 @@ static char *cli_prompt(EditLine *el)
} else if (remotehostname)
snprintf(prompt, sizeof(prompt), ASTERISK_PROMPT2, remotehostname);
else
snprintf(prompt, sizeof(prompt), ASTERISK_PROMPT);
ast_copy_string(prompt, ASTERISK_PROMPT, sizeof(prompt));
return(prompt);
}
@@ -2206,7 +2206,7 @@ static void ast_remotecontrol(char * data)
snprintf(tmp, sizeof(tmp), "core set debug atleast %d", option_debug);
fdprint(ast_consock, tmp);
if (ast_opt_mute) {
snprintf(tmp, sizeof(tmp), "log and verbose output currently muted ('logger unmute' to unmute)");
ast_copy_string(tmp, "log and verbose output currently muted ('logger unmute' to unmute)", sizeof(tmp));
fdprint(ast_consock, tmp);
}
ast_verbose("Connected to Asterisk %s currently running on %s (pid = %d)\n", version, hostname, pid);