diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-07-10 23:21:39 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-07-10 23:21:39 +0000 |
commit | cbc8a4b7d2382b98f0666fd6a81ce4cca5a4fc22 (patch) | |
tree | cd22ca2f4e2c7b9edcb1c3ee5c724068bae3bc36 /res/res_crypto.c | |
parent | d99da55a16b32f4463c40d504fa2ffee4ba8966d (diff) |
more ast_copy_string conversions
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6075 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_crypto.c')
-rwxr-xr-x | res/res_crypto.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_crypto.c b/res/res_crypto.c index 43936a297..796515ee3 100755 --- a/res/res_crypto.c +++ b/res/res_crypto.c @@ -217,9 +217,9 @@ static struct ast_key *try_load_key (char *dir, char *fname, int ifd, int ofd, i if (found) ast_mutex_lock(&keylock); /* First the filename */ - strncpy(key->fn, ffname, sizeof(key->fn) - 1); + ast_copy_string(key->fn, ffname, sizeof(key->fn)); /* Then the name */ - strncpy(key->name, fname, sizeof(key->name) - 1); + ast_copy_string(key->name, fname, sizeof(key->name)); key->ktype = ktype; /* Yes, assume we're going to be deleted */ key->delme = 1; @@ -529,7 +529,7 @@ static int init_keys(int fd, int argc, char *argv[]) /* Reload keys that need pass codes now */ if (key->ktype & KEY_NEEDS_PASSCODE) { kn = key->fn + strlen(ast_config_AST_KEY_DIR) + 1; - strncpy(tmp, kn, sizeof(tmp) - 1); + ast_copy_string(tmp, kn, sizeof(tmp)); try_load_key((char *)ast_config_AST_KEY_DIR, tmp, fd, fd, &ign); } key = key->next; |