From: Joshua Colp Date: Tue, 3 Nov 2009 15:36:16 +0000 (+0000) Subject: Fix a bug where an RPID header could be generated with a blank username in the URI. X-Git-Tag: 1.4.27-rc3~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4298a49f0ec0c09c97195e056f0b1245a5c9b77;p=thirdparty%2Fasterisk.git Fix a bug where an RPID header could be generated with a blank username in the URI. (closes issue #15909) Reported by: kobaz git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@227166 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f804da87b3..fdd3dc7c47 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -7272,7 +7272,7 @@ static void build_rpid(struct sip_pvt *p) if (!ast_strlen_zero(p->rpid) || !ast_strlen_zero(p->rpid_from)) return; - if (p->owner && p->owner->cid.cid_num) + if (p->owner && !ast_strlen_zero(p->owner->cid.cid_num)) clid = p->owner->cid.cid_num; if (p->owner && p->owner->cid.cid_name) clin = p->owner->cid.cid_name;