MCPcopy Create free account
hub / github.com/acl-dev/acl / test_invalid_hex_input

Function test_invalid_hex_input

test/json/json_check.c:69–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69static int test_invalid_hex_input(void)
70{
71 ACL_JSON *json = acl_json_alloc();
72 const char *data = "{\"bad\":\"A\\u12G4B\"}";
73 const char *expect = "A" UTF8_REPLACEMENT "G4B";
74 int ok;
75
76 acl_json_update(json, data);
77 ok = acl_json_finish(json)
78 && check_tag_value(json, "bad", expect);
79
80 acl_json_free(json);
81 return ok;
82}
83
84static int test_invalid_surrogate_input(void)
85{

Callers 1

mainFunction · 0.85

Calls 5

acl_json_allocFunction · 0.85
acl_json_updateFunction · 0.85
acl_json_finishFunction · 0.85
check_tag_valueFunction · 0.85
acl_json_freeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…