Fix silly typo in iax2 where strlen was used instead of sizeof
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
bb8d1dbb3a
commit
6d280193d6
|
@ -2938,7 +2938,7 @@ static int iax2_show_users(int fd, int argc, char *argv[])
|
||||||
ast_cli(fd, FORMAT, "Username", "Secret", "Authen", "Def.Context", "A/C");
|
ast_cli(fd, FORMAT, "Username", "Secret", "Authen", "Def.Context", "A/C");
|
||||||
for(user=userl.users;user;user=user->next) {
|
for(user=userl.users;user;user=user->next) {
|
||||||
if (!ast_strlen_zero(user->secret)) {
|
if (!ast_strlen_zero(user->secret)) {
|
||||||
strncpy(auth,user->secret,strlen(auth)-1);
|
strncpy(auth,user->secret,sizeof(auth)-1);
|
||||||
} else if (!ast_strlen_zero(user->inkeys)) {
|
} else if (!ast_strlen_zero(user->inkeys)) {
|
||||||
sprintf(auth,"Key: %-15.15s ",user->inkeys);
|
sprintf(auth,"Key: %-15.15s ",user->inkeys);
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in New Issue