Fix silly typo in iax2 where strlen was used instead of sizeof
authorMark Spencer <markster@digium.com>
Thu, 6 May 2004 20:39:31 +0000 (20:39 +0000)
committerMark Spencer <markster@digium.com>
Thu, 6 May 2004 20:39:31 +0000 (20:39 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2908 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index eb884e7..71602fe 100755 (executable)
@@ -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");
        for(user=userl.users;user;user=user->next) {
                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)) {
                        sprintf(auth,"Key: %-15.15s ",user->inkeys);
                } else