diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-10-12 16:24:14 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-10-13 18:13:00 -0500 |
commit | 9c49b96374a9f631c75fc9953f825126c883ff4d (patch) | |
tree | f43da7d9cbb3a457efcfdd1e168587d97e9ad4c7 /apps/app_queue.c | |
parent | 774d5f7ef78f85a17c31c9dfbe51a96477d34940 (diff) |
Audit ast_json_pack() calls for needed UTF-8 checks.
Added needed UTF-8 checks before constructing json objects in various
files for strings obtained outside the system. In this case string values
from a channel driver's peer and not from the user setting channel
variables.
* aoc.c: Fixed type mismatch in s_to_json() for time and granularity json
object construction.
ASTERISK-26466
Reported by: Richard Mudgett
Change-Id: Iac2d867fa598daba5c5dbc619b5464625a7f2096
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index a023b88ed..e49d80c16 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -5645,12 +5645,12 @@ static void send_agent_complete(const char *queuename, struct ast_channel_snapsh } blob = ast_json_pack("{s: s, s: s, s: s, s: i, s: i, s: s}", - "Queue", queuename, - "Interface", member->interface, - "MemberName", member->membername, - "HoldTime", (long)(callstart - holdstart), - "TalkTime", (long)(time(NULL) - callstart), - "Reason", reason); + "Queue", queuename, + "Interface", member->interface, + "MemberName", member->membername, + "HoldTime", (long)(callstart - holdstart), + "TalkTime", (long)(time(NULL) - callstart), + "Reason", reason ?: ""); queue_publish_multi_channel_snapshot_blob(ast_queue_topic(queuename), caller, peer, queue_agent_complete_type(), blob); |