diff options
author | Joshua Colp <jcolp@digium.com> | 2014-09-03 14:05:28 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2014-09-03 14:05:28 +0000 |
commit | 1bcb46c5783d8363f1dbb86e745710c1494829ff (patch) | |
tree | 6db1af192e357e65563702489a640f62708fec47 /res/res_pjsip_transport_websocket.c | |
parent | c98e04753bf3c1e3e3b9764d848f5d948e0dc7ae (diff) |
res_pjsip_transport_websocket: Fix crash when the Contact header is not a URI.
The code for changing the Contact header wrongly assumed that the Contact
would always contain a URI. This is incorrect.
ASTERISK-24271
Reported by: Dafi Ni
........
Merged revisions 422557 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@422558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_transport_websocket.c')
-rw-r--r-- | res/res_pjsip_transport_websocket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjsip_transport_websocket.c b/res/res_pjsip_transport_websocket.c index 00d807f68..7de65dd85 100644 --- a/res/res_pjsip_transport_websocket.c +++ b/res/res_pjsip_transport_websocket.c @@ -322,7 +322,7 @@ static pj_bool_t websocket_on_rx_msg(pjsip_rx_data *rdata) return PJ_FALSE; } - if ((contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, NULL)) && + if ((contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, NULL)) && !contact->star && (PJSIP_URI_SCHEME_IS_SIP(contact->uri) || PJSIP_URI_SCHEME_IS_SIPS(contact->uri))) { pjsip_sip_uri *uri = pjsip_uri_get_uri(contact->uri); |