fix a sizeof bug (bug #4264)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Russell Bryant 21 years ago
parent b2073cb75f
commit 71a395e3e3

@ -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';
}

Loading…
Cancel
Save