]> git.ipfire.org Git - thirdparty/asterisk.git/commit
various modules: json integer overflow
authorKevin Harwell <kharwell@digium.com>
Thu, 1 Aug 2019 21:22:01 +0000 (16:22 -0500)
committerKevin Harwell <kharwell@digium.com>
Thu, 1 Aug 2019 21:31:34 +0000 (15:31 -0600)
commita305f2fdcb6c665c7bdfe779a370f09e1be35794
treeb0fb09c0f6f26b49a50d06d2a989b36fb0807d24
parent7300bdd382ee9235bdc6403d9921e9e12c3e3b65
various modules: json integer overflow

There were still a few places in the code that could overflow when "packing"
a json object with a value outside the base type integer's range. For instance:

unsigned int value = INT_MAX + 1
ast_json_pack("{s: i}", value);

would result in a negative number being "packed". In those situations this patch
alters those values to a ast_json_int_t, which widens the value up to a long or
long long.

ASTERISK-28480

Change-Id: Ied530780d83e6f1772adba0e28d8938ef30c49a1
apps/app_agent_pool.c
apps/app_queue.c
channels/chan_iax2.c
funcs/func_talkdetect.c
main/aoc.c
main/ccss.c
main/channel.c
main/core_local.c
main/rtp_engine.c
main/stasis_channels.c