aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_zapscan.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-14 07:34:34 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-14 07:34:34 +0000
commit4e18ef688947854313b99f35aa30c0e7d8ae29cd (patch)
tree54b0d7240765bc43ef378f171a536e6bc7d206d9 /apps/app_zapscan.c
parent59d780973e0c1aab681be9dcba1baa2706caf92f (diff)
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
Diffstat (limited to 'apps/app_zapscan.c')
-rwxr-xr-xapps/app_zapscan.c4
1 files changed, 2 insertions, 2 deletions
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';