]> git.ipfire.org Git - thirdparty/asterisk.git/commit
rtp_engine: rtcp_report_to_json can overflow the ssrc integer value
authorKevin Harwell <kharwell@digium.com>
Mon, 17 Sep 2018 20:35:05 +0000 (15:35 -0500)
committerCorey Farrell <git@cfware.com>
Fri, 21 Sep 2018 22:06:55 +0000 (17:06 -0500)
commit720f76def0a9a243bfc19df96e143f7ee82a0f01
treed0b617c83c9328f14f3cf42b480246fe03bdbac3
parent51656adf35dbe09b72a5550b63999803b49f3638
rtp_engine: rtcp_report_to_json can overflow the ssrc integer value

When writing an RTCP report to json the code attempts to pack the "ssrc" and
"source_ssrc" unsigned integer values as a signed int value type. This of course
means if the ssrc's unsigned value is greater than that which can fit into a
signed integer value it gets converted to a negative number. Subsequently, the
negative value goes out in the json report.

This patch now packs the value as a json_int_t, which is the widest integer type
available on a given system. This should make it so the value no longer
overflows.

Note, this was caught by two failing tests hep/rtcp-receiver/ and
hep/rtcp-sender.

Change-Id: I2af275286ee5e795b79f0c3d450d9e4b28e958b0
configure
configure.ac
include/asterisk/autoconfig.h.in
include/asterisk/json.h
main/rtp_engine.c
menuselect/configure
third-party/jansson/configure.m4