<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7776">View Change</a></p><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 res/res_pjsip_sdp_rtp.c<br>2 files changed, 4 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/76/7776/1</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 eee873b..1aa47e2 100644<br>--- a/channels/chan_sip.c<br>+++ b/channels/chan_sip.c<br>@@ -11296,7 +11296,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>@@ -11310,7 +11310,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/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/7776">change 7776</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/7776"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I05ce7a5952721a76a2b4c90366168022558dc7cf </div>
<div style="display:none"> Gerrit-Change-Number: 7776 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>