diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-10-14 17:17:12 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-10-14 17:17:12 -0500 |
commit | 3bdd7c0e38f41fbfacec2796be0d90cbd714856f (patch) | |
tree | 8038886f344bea8dff4a1f1df3fc1ae1b8288285 /apps | |
parent | 8d12d6021ba2fc2c4770a7651e6122b42748f2da (diff) | |
parent | 3c54328c572968a2e8e43257e1e521069a78379a (diff) |
Merge "Audit ast_json_pack() calls for needed UTF-8 checks." into 13
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_fax.c | 14 | ||||
-rw-r--r-- | apps/app_queue.c | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/apps/app_fax.c b/apps/app_fax.c index 88aa6ad1a..e2a7c2a4c 100644 --- a/apps/app_fax.c +++ b/apps/app_fax.c @@ -262,13 +262,13 @@ static void phase_e_handler(t30_state_t *f, void *user_data, int result) } ast_json_ref(json_filenames); json_object = ast_json_pack("{s: s, s: s, s: s, s: i, s: i, s: i, s: o}", - "type", s->direction ? "send" : "receive", - "remote_station_id", far_ident, - "local_station_id", local_ident, - "fax_pages", pages_transferred, - "fax_resolution", stat.y_resolution, - "fax_bitrate", stat.bit_rate, - "filenames", json_filenames); + "type", s->direction ? "send" : "receive", + "remote_station_id", AST_JSON_UTF8_VALIDATE(far_ident), + "local_station_id", AST_JSON_UTF8_VALIDATE(local_ident), + "fax_pages", pages_transferred, + "fax_resolution", stat.y_resolution, + "fax_bitrate", stat.bit_rate, + "filenames", json_filenames); message = ast_channel_blob_create_from_cache(ast_channel_uniqueid(s->chan), ast_channel_fax_type(), json_object); if (!message) { return; diff --git a/apps/app_queue.c b/apps/app_queue.c index 79a19c8f6..0cc3b2685 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -5616,12 +5616,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); |