From 4e18ef688947854313b99f35aa30c0e7d8ae29cd Mon Sep 17 00:00:00 2001 From: markster Date: Wed, 14 Jul 2004 07:34:34 +0000 Subject: Merge rgagnon's pedantic string changes (apps n-z) (bug #2038) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3429 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_zapscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/app_zapscan.c') diff --git a/apps/app_zapscan.c b/apps/app_zapscan.c index 178cc511c..b6f96c74f 100755 --- a/apps/app_zapscan.c +++ b/apps/app_zapscan.c @@ -284,7 +284,7 @@ static int conf_exec(struct ast_channel *chan, void *data) struct localuser *u; int confflags = 0; int confno = 0; - char confstr[80], *tmp; + char confstr[80] = "", *tmp; struct ast_channel *tempchan = NULL, *lastchan = NULL,*ichan = NULL; struct ast_frame *f; int input=0; @@ -319,7 +319,7 @@ static int conf_exec(struct ast_channel *chan, void *data) break; if ( tempchan && tempchan->type && (!strcmp(tempchan->type, "Zap")) && (tempchan != chan) ) { ast_verbose(VERBOSE_PREFIX_3 "Zap channel %s is in-use, monitoring...\n", tempchan->name); - strcpy(confstr, tempchan->name); + strncpy(confstr, tempchan->name, sizeof(confstr) - 1); ast_mutex_unlock(&tempchan->lock); if ((tmp = strchr(confstr,'-'))) { *tmp = '\0'; -- cgit v1.2.3