Fix small sizeof bug (#4407)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2005-05-30 13:57:51 +00:00
parent 5b55f3600b
commit 04be319867

View File

@@ -2945,7 +2945,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 */
ast_copy_string(iaxs[callno]->outkey, secret + 1, sizeof(iaxs[callno]->secret));
ast_copy_string(iaxs[callno]->outkey, secret + 1, sizeof(iaxs[callno]->outkey));
if (!ast_strlen_zero(iaxs[callno]->outkey)) {
iaxs[callno]->outkey[strlen(iaxs[callno]->outkey) - 1] = '\0';
}