summaryrefslogtreecommitdiff
path: root/res/res_pjsip_sdp_rtp.c
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 /res/res_pjsip_sdp_rtp.c
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 'res/res_pjsip_sdp_rtp.c')
-rw-r--r--res/res_pjsip_sdp_rtp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index 854ed1459..9e0411903 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -627,7 +627,7 @@ static void process_ice_attributes(struct ast_sip_session *session, struct ast_s
/* Find all of the candidates */
for (attr_i = 0; attr_i < remote_stream->attr_count; ++attr_i) {
- char foundation[32], transport[32], address[PJ_INET6_ADDRSTRLEN + 1], cand_type[6], relay_address[PJ_INET6_ADDRSTRLEN + 1] = "";
+ char foundation[33], transport[32], address[PJ_INET6_ADDRSTRLEN + 1], cand_type[6], relay_address[PJ_INET6_ADDRSTRLEN + 1] = "";
unsigned int port, relay_port = 0;
struct ast_rtp_engine_ice_candidate candidate = { 0, };
@@ -640,7 +640,7 @@ static void process_ice_attributes(struct ast_sip_session *session, struct ast_s
ast_copy_pj_str(attr_value, (pj_str_t*)&attr->value, sizeof(attr_value));
- if (sscanf(attr_value, "%31s %30u %31s %30u %46s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport,
+ if (sscanf(attr_value, "%32s %30u %31s %30u %46s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport,
(unsigned *)&candidate.priority, address, &port, cand_type, relay_address, &relay_port) < 7) {
/* Candidate did not parse properly */
continue;