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:12:16 -0500 |
commit | aba27b5a609329b2e2380d0d760d67a9d5de8fe4 (patch) | |
tree | 814b11eda8026fc1f973e84b506dd5f9103b0243 /main/cel.c | |
parent | beae5022bfcfa52ee43f6adc1a5a0b35bd63ef7c (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 'main/cel.c')
-rw-r--r-- | main/cel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/cel.c b/main/cel.c index ad75c0186..aafeea432 100644 --- a/main/cel.c +++ b/main/cel.c @@ -1237,10 +1237,10 @@ static void cel_parking_cb( if (parked_payload->retriever) { extra = ast_json_pack("{s: s, s: s}", - "reason", reason, + "reason", reason ?: "", "retriever", parked_payload->retriever->name); } else { - extra = ast_json_pack("{s: s}", "reason", reason); + extra = ast_json_pack("{s: s}", "reason", reason ?: ""); } if (extra) { |