<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7777">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Corey Farrell: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ice: Increase foundation buffer size<br><br>Per RFC 5245, the foundation specified with an ICE candidate can be up<br>to 32 characters but we are only allowing for 31.<br><br>ASTERISK-27498 #close<br>Reported by: Michele PrĂ <br><br>Change-Id: I05ce7a5952721a76a2b4c90366168022558dc7cf<br>---<br>M channels/chan_sip.c<br>M main/sdp_state.c<br>M res/res_pjsip_sdp_rtp.c<br>3 files changed, 6 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/chan_sip.c b/channels/chan_sip.c<br>index ed94948..e204f00 100644<br>--- a/channels/chan_sip.c<br>+++ b/channels/chan_sip.c<br>@@ -11343,7 +11343,7 @@<br> {<br> struct ast_rtp_engine_ice *ice;<br> int found = FALSE;<br>- char ufrag[256], pwd[256], foundation[32], transport[4], address[46], cand_type[6], relay_address[46] = "";<br>+ char ufrag[256], pwd[256], foundation[33], transport[4], address[46], cand_type[6], relay_address[46] = "";<br> struct ast_rtp_engine_ice_candidate candidate = { 0, };<br> unsigned int port, relay_port = 0;<br> <br>@@ -11357,7 +11357,7 @@<br> } else if (sscanf(a, "ice-pwd: %255s", pwd) == 1) {<br> ice->set_authentication(instance, NULL, pwd);<br> found = TRUE;<br>- } else if (sscanf(a, "candidate: %31s %30u %3s %30u %23s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport, (unsigned *)&candidate.priority,<br>+ } else if (sscanf(a, "candidate: %32s %30u %3s %30u %23s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport, (unsigned *)&candidate.priority,<br> address, &port, cand_type, relay_address, &relay_port) >= 7) {<br> <br> if (rtcp_mux_offered && ast_test_flag(&p->flags[2], SIP_PAGE3_RTCP_MUX) && candidate.id > 1) {<br>diff --git a/main/sdp_state.c b/main/sdp_state.c<br>index bccde61..5f9ad5e 100644<br>--- a/main/sdp_state.c<br>+++ b/main/sdp_state.c<br>@@ -2171,7 +2171,7 @@<br> <br> /* Find all of the candidates */<br> for (attr_i = 0; attr_i < ast_sdp_m_get_a_count(remote_m_line); ++attr_i) {<br>- char foundation[32];<br>+ char foundation[33];<br> char transport[32];<br> char address[INET6_ADDRSTRLEN + 1];<br> char cand_type[6];<br>@@ -2187,7 +2187,7 @@<br> continue;<br> }<br> <br>- if (sscanf(attr->value, "%31s %30u %31s %30u %46s %30u typ %5s %*s %23s %*s %30u",<br>+ if (sscanf(attr->value, "%32s %30u %31s %30u %46s %30u typ %5s %*s %23s %*s %30u",<br> foundation, &candidate.id, transport, (unsigned *)&candidate.priority, address,<br> &port, cand_type, relay_address, &relay_port) < 7) {<br> /* Candidate did not parse properly */<br>diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c<br>index 854ed14..9e04119 100644<br>--- a/res/res_pjsip_sdp_rtp.c<br>+++ b/res/res_pjsip_sdp_rtp.c<br>@@ -627,7 +627,7 @@<br> <br> /* Find all of the candidates */<br> for (attr_i = 0; attr_i < remote_stream->attr_count; ++attr_i) {<br>- char foundation[32], transport[32], address[PJ_INET6_ADDRSTRLEN + 1], cand_type[6], relay_address[PJ_INET6_ADDRSTRLEN + 1] = "";<br>+ char foundation[33], transport[32], address[PJ_INET6_ADDRSTRLEN + 1], cand_type[6], relay_address[PJ_INET6_ADDRSTRLEN + 1] = "";<br> unsigned int port, relay_port = 0;<br> struct ast_rtp_engine_ice_candidate candidate = { 0, };<br> <br>@@ -640,7 +640,7 @@<br> <br> ast_copy_pj_str(attr_value, (pj_str_t*)&attr->value, sizeof(attr_value));<br> <br>- if (sscanf(attr_value, "%31s %30u %31s %30u %46s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport,<br>+ if (sscanf(attr_value, "%32s %30u %31s %30u %46s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport,<br> (unsigned *)&candidate.priority, address, &port, cand_type, relay_address, &relay_port) < 7) {<br> /* Candidate did not parse properly */<br> continue;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7777">change 7777</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7777"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I05ce7a5952721a76a2b4c90366168022558dc7cf </div>
<div style="display:none"> Gerrit-Change-Number: 7777 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>