diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-27 02:48:56 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-27 02:48:56 +0000 |
commit | 36d630b4fe9fef00ede0f2d69f6ea50ce83f49ae (patch) | |
tree | 3d9d78227780c5cd9ce5774ff86f85b3cbf8c94c /apps | |
parent | b20f2640e38a5e8086568edf803836840fc222f9 (diff) |
strncpy to ast_copy_string
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6868 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_disa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/app_disa.c b/apps/app_disa.c index 6e52b0dde..842b8aaf0 100755 --- a/apps/app_disa.c +++ b/apps/app_disa.c @@ -164,7 +164,7 @@ static int disa_exec(struct ast_channel *chan, void *data) ourcontext = strsep(&stringp, "|"); /* if context specified, save 2nd arg and parse third */ if (ourcontext) { - strncpy(arg2,ourcontext, sizeof(arg2) - 1); + ast_copy_string(arg2, ourcontext, sizeof(arg2)); ourcallerid = strsep(&stringp,"|"); } /* if context not specified, use "disa" */ @@ -306,7 +306,7 @@ static int disa_exec(struct ast_channel *chan, void *data) k|=1; /* In number mode */ i = 0; /* re-set buffer pointer */ exten[sizeof(acctcode)] = 0; - strncpy(acctcode,exten, sizeof(acctcode) - 1); + ast_copy_string(acctcode, exten, sizeof(acctcode)); exten[0] = 0; ast_log(LOG_DEBUG,"Successful DISA log-in on chan %s\n",chan->name); continue; @@ -353,7 +353,7 @@ static int disa_exec(struct ast_channel *chan, void *data) } if (!ast_strlen_zero(acctcode)) - strncpy(chan->accountcode, acctcode, sizeof(chan->accountcode) - 1); + ast_copy_string(chan->accountcode, acctcode, sizeof(chan->accountcode)); ast_cdr_reset(chan->cdr, AST_CDR_FLAG_POSTED); ast_explicit_goto(chan, ourcontext, exten, 1); |