summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-12-31 11:26:54 -0500
committerSean Bright <sean.bright@gmail.com>2017-12-31 11:34:41 -0500
commit15f8b9b8bfe340441950a67b16b3b5b74cc7d15e (patch)
treec3149a8a128c0046330c4f1b878333e8f54ac94f /channels
parent80e6b2eff54a4ff57e2521164224b1b1c878ae94 (diff)
ice: Increase foundation buffer size
Per RFC 5245, the foundation specified with an ICE candidate can be up to 32 characters but we are only allowing for 31. ASTERISK-27498 #close Reported by: Michele PrĂ  Change-Id: I05ce7a5952721a76a2b4c90366168022558dc7cf
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ed94948a4..e204f0053 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -11343,7 +11343,7 @@ static int process_sdp_a_ice(const char *a, struct sip_pvt *p, struct ast_rtp_in
{
struct ast_rtp_engine_ice *ice;
int found = FALSE;
- char ufrag[256], pwd[256], foundation[32], transport[4], address[46], cand_type[6], relay_address[46] = "";
+ char ufrag[256], pwd[256], foundation[33], transport[4], address[46], cand_type[6], relay_address[46] = "";
struct ast_rtp_engine_ice_candidate candidate = { 0, };
unsigned int port, relay_port = 0;
@@ -11357,7 +11357,7 @@ static int process_sdp_a_ice(const char *a, struct sip_pvt *p, struct ast_rtp_in
} else if (sscanf(a, "ice-pwd: %255s", pwd) == 1) {
ice->set_authentication(instance, NULL, pwd);
found = TRUE;
- } else if (sscanf(a, "candidate: %31s %30u %3s %30u %23s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport, (unsigned *)&candidate.priority,
+ } else if (sscanf(a, "candidate: %32s %30u %3s %30u %23s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport, (unsigned *)&candidate.priority,
address, &port, cand_type, relay_address, &relay_port) >= 7) {
if (rtcp_mux_offered && ast_test_flag(&p->flags[2], SIP_PAGE3_RTCP_MUX) && candidate.id > 1) {