]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix a sizeof bug (bug #4264)
authorRussell Bryant <russell@russellbryant.com>
Tue, 31 May 2005 12:58:08 +0000 (12:58 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 31 May 2005 12:58:08 +0000 (12:58 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5803 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 40a9797298e8fd4aeae22ca7ed4c128cfbf758e8..23348c2eaecba178f49061c39b8a97ca1a719ef2 100755 (executable)
@@ -2369,7 +2369,7 @@ static int iax2_call(struct ast_channel *c, char *dest, int timeout)
        if (secret) {
                if (secret[0] == '[') {
                        /* This is an RSA key, not a normal secret */
-                       strncpy(iaxs[callno]->outkey, secret + 1, sizeof(iaxs[callno]->secret)-1);
+                       strncpy(iaxs[callno]->outkey, secret + 1, sizeof(iaxs[callno]->outkey)-1);
                        if (!ast_strlen_zero(iaxs[callno]->outkey)) {
                                iaxs[callno]->outkey[strlen(iaxs[callno]->outkey) - 1] = '\0';
                        }