(closes issue #10495)
authorJoshua Colp <jcolp@digium.com>
Mon, 20 Aug 2007 00:54:19 +0000 (00:54 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 20 Aug 2007 00:54:19 +0000 (00:54 +0000)
Reported by: stevedavies
Make sure context pointer is valid or else chan_iax2 will go kaboom.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79990 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 08352a6..e9e2e74 100644 (file)
@@ -9549,7 +9549,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st
 
        if (!ast_strlen_zero(peer->mailbox)) {
                char *mailbox, *context;
-               mailbox = ast_strdupa(peer->mailbox);
+               context = mailbox = ast_strdupa(peer->mailbox);
                strsep(&context, "@");
                if (ast_strlen_zero(context))
                        context = "default";