diff options
Diffstat (limited to 'channels/chan_alsa.c')
-rw-r--r-- | channels/chan_alsa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c index 343eb035b..ad49e9bb0 100644 --- a/channels/chan_alsa.c +++ b/channels/chan_alsa.c @@ -1042,7 +1042,7 @@ static int console_dial(int fd, int argc, char *argv[]) myc = context; if (argc == 3) { char *stringp = NULL; - strncpy(tmp, argv[2], sizeof(tmp) - 1); + ast_copy_string(tmp, argv[2], sizeof(tmp)); stringp = tmp; strsep(&stringp, "@"); tmp2 = strsep(&stringp, "@"); @@ -1052,8 +1052,8 @@ static int console_dial(int fd, int argc, char *argv[]) myc = tmp2; } if (ast_exists_extension(NULL, myc, mye, 1, NULL)) { - strncpy(alsa.exten, mye, sizeof(alsa.exten) - 1); - strncpy(alsa.context, myc, sizeof(alsa.context) - 1); + ast_copy_string(alsa.exten, mye, sizeof(alsa.exten)); + ast_copy_string(alsa.context, myc, sizeof(alsa.context)); hookstate = 1; alsa_new(&alsa, AST_STATE_RINGING); } else |