Merge "rtp_engine: rtcp_report_to_json can overflow the ssrc integer value"

This commit is contained in:
George Joseph
2018-09-26 08:02:28 -05:00
committed by Gerrit Code Review
7 changed files with 101 additions and 37 deletions

View File

@@ -3379,8 +3379,8 @@ static struct ast_json *rtcp_report_to_json(struct stasis_message *msg,
char str_lsr[32];
snprintf(str_lsr, sizeof(str_lsr), "%u", payload->report->report_block[i]->lsr);
json_report_block = ast_json_pack("{s: i, s: i, s: i, s: i, s: i, s: s, s: i}",
"source_ssrc", payload->report->report_block[i]->source_ssrc,
json_report_block = ast_json_pack("{s: I, s: i, s: i, s: i, s: i, s: s, s: i}",
"source_ssrc", (ast_json_int_t)payload->report->report_block[i]->source_ssrc,
"fraction_lost", payload->report->report_block[i]->lost_count.fraction,
"packets_lost", payload->report->report_block[i]->lost_count.packets,
"highest_seq_no", payload->report->report_block[i]->highest_seq_no,
@@ -3412,8 +3412,8 @@ static struct ast_json *rtcp_report_to_json(struct stasis_message *msg,
}
}
json_rtcp_report = ast_json_pack("{s: i, s: i, s: i, s: o, s: o}",
"ssrc", payload->report->ssrc,
json_rtcp_report = ast_json_pack("{s: I, s: i, s: i, s: o, s: o}",
"ssrc", (ast_json_int_t)payload->report->ssrc,
"type", payload->report->type,
"report_count", payload->report->reception_report_count,
"sender_information", json_rtcp_sender_info ?: ast_json_null(),