mirror of
https://github.com/json-c/json-c.git
synced 2026-11-08 22:50:47 +08:00
Issue #275: fix out of bounds read when handling unicode surrogate pairs.
This commit is contained in:
1 parent
5fd99e62ed
commit
36a28fcb0c
3 files changed
+9
-3
No files matched your search
@@ -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