]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merge "Audit ast_json_pack() calls for needed UTF-8 checks." into 13
authorzuul <zuul@gerrit.asterisk.org>
Fri, 14 Oct 2016 22:17:12 +0000 (17:17 -0500)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Fri, 14 Oct 2016 22:17:12 +0000 (17:17 -0500)
1  2 
apps/app_queue.c
main/aoc.c

Simple merge
diff --cc main/aoc.c
index 258525e654ec9ea9e390e51d6043276ca3e30570,6c518765cfd463559af56969874f95f2c04cbd87..ba151d7606fc60edd603e4f17c7c8f7178c9cf1c
@@@ -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();