]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merge "Audit ast_json_pack() calls for needed UTF-8 checks." into 14
authorJoshua Colp <jcolp@digium.com>
Fri, 14 Oct 2016 19:15:51 +0000 (14:15 -0500)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Fri, 14 Oct 2016 19:15:51 +0000 (14:15 -0500)
1  2 
apps/app_queue.c
main/aoc.c

Simple merge
diff --cc main/aoc.c
index b98bfa76540b692d62cc8db95f4d90e37010e336,552c406a1571e1f4095dfd5158e577b730647071..8d4332901f655fb1837d19bfbfc6c4e49d3b575b
@@@ -1691,12 -1694,12 +1693,11 @@@ static struct ast_json *association_to_
  {
        switch (decoded->charging_association.charging_type) {
        case AST_AOC_CHARGING_ASSOCIATION_NUMBER:
-               return ast_json_pack(
-                       "{s:s, s:i}",
-                       "Number", decoded->charging_association.charge.number.number,
+               return ast_json_pack("{s:s, s:i}",
+                       "Number", AST_JSON_UTF8_VALIDATE(decoded->charging_association.charge.number.number),
                        "Plan", decoded->charging_association.charge.number.plan);
        case AST_AOC_CHARGING_ASSOCIATION_ID:
 -              return ast_json_pack(
 -                      "{s:i}", "ID", decoded->charging_association.charge.id);
 +              return ast_json_pack("{s:i}", "ID", decoded->charging_association.charge.id);
        case AST_AOC_CHARGING_ASSOCIATION_NA:
        default:
                return ast_json_null();