[asterisk-commits] file: branch 12 r405019 - /branches/12/res/res_pjsip_nat.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 7 08:55:32 CST 2014
Author: file
Date: Tue Jan 7 08:55:26 2014
New Revision: 405019
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=405019
Log:
res_pjsip_nat: Don't assume a Contact header will always contain a URI.
If the 'rewrite_contact' option was enabled and a Contact header was received
which contained a '*' a crash would occur.
This change makes the res_pjsip_nat module ignore the Contact header if it
contains only a '*'.
(closes issue ASTERISK-23101)
Reported by: Matt Jordan
Modified:
branches/12/res/res_pjsip_nat.c
Modified: branches/12/res/res_pjsip_nat.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip_nat.c?view=diff&rev=405019&r1=405018&r2=405019
==============================================================================
--- branches/12/res/res_pjsip_nat.c (original)
+++ branches/12/res/res_pjsip_nat.c Tue Jan 7 08:55:26 2014
@@ -42,7 +42,7 @@
}
if (endpoint->nat.rewrite_contact && (contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, NULL)) &&
- (PJSIP_URI_SCHEME_IS_SIP(contact->uri) || PJSIP_URI_SCHEME_IS_SIPS(contact->uri))) {
+ !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);
pj_cstr(&uri->host, rdata->pkt_info.src_name);
More information about the asterisk-commits
mailing list