From dac373f5395aca9a9f3f75b089e415ec6f0a51f4 Mon Sep 17 00:00:00 2001 From: russell Date: Mon, 1 Oct 2007 15:23:19 +0000 Subject: 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 --- main/asterisk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/asterisk.c') diff --git a/main/asterisk.c b/main/asterisk.c index fb12e5900..59b97e59e 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -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); -- cgit v1.2.3