mirror of
https://github.com/json-c/json-c.git
synced 2026-04-01 03:19:06 +08:00
Issue #275: fix out of bounds read when handling unicode surrogate pairs.
This commit is contained in:
@@ -44,6 +44,11 @@ static void test_basic_parse()
|
||||
printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
|
||||
json_object_put(new_obj);
|
||||
|
||||
// Test with a "short" high surrogate
|
||||
new_obj = json_tokener_parse("[9,'\\uDAD");
|
||||
printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
|
||||
json_object_put(new_obj);
|
||||
|
||||
new_obj = json_tokener_parse("null");
|
||||
printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
|
||||
json_object_put(new_obj);
|
||||
|
||||
Reference in New Issue
Block a user