diff options
author | Joshua Colp <jcolp@digium.com> | 2009-05-18 13:36:17 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2009-05-18 13:36:17 +0000 |
commit | 9f4e8a5bda633e92fe0c77184c24e45f778dc42a (patch) | |
tree | a353ab14893581d76cad48155c9de7d6a7855389 /channels | |
parent | a007eb13b2c477c7f08ab9219ee405dc87db77cb (diff) |
Fix a bug where specifying an empty outboundproxy would cause packets to get sent to ourself.
(closes issue #15106)
Reported by: timeshell
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4e3591ebe..fd30dfd94 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3097,6 +3097,11 @@ static int proxy_update(struct sip_proxy *proxy) static struct sip_proxy *proxy_allocate(char *name, char *port, int force) { struct sip_proxy *proxy; + + if (ast_strlen_zero(name)) { + return NULL; + } + proxy = ao2_alloc(sizeof(*proxy), NULL); if (!proxy) return NULL; |