This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
Register
Sign In
jdk-build-libs
/
json-c
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
11
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
json_object_deep_copy: fix deep copy of strings containing '\0'
tags/json-c-0.16-20220414
Ramiro Polla
6 years ago
parent
1f46d2f40f
commit
ab3e40b37c
3 changed files
with
3 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
json_object.c
+1
-0
tests/test_deep_copy.c
+1
-0
tests/test_deep_copy.expected
+ 1
- 1
json_object.c
View File
@@ -1388,7 +1388,7 @@ int json_c_shallow_copy_default(json_object *src, json_object *parent, const cha
break;
case json_type_string:
*dst = json_object_new_string(get_string_component(src));
*dst = json_object_new_string
_len
(get_string_component(src)
, src->o.c_string.len
);
break;
case json_type_object:
+ 1
- 0
tests/test_deep_copy.c
View File
@@ -18,6 +18,7 @@ static const char *json_str1 =
" \"GlossDiv\": {"
" \"title\": \"S\","
" \"null_obj\": null, "
" \"null_str\": \" \\u0000 \","
" \"GlossList\": {"
" \"GlossEntry\": {"
" \"ID\": \"SGML\","
+ 1
- 0
tests/test_deep_copy.expected
View File
@@ -13,6 +13,7 @@ Printing JSON objects for visual inspection
"GlossDiv":{
"title":"S",
"null_obj":null,
"null_str":" \u0000 ",
"GlossList":{
"GlossEntry":{
"ID":"SGML",
Write
Preview
Loading…
Cancel
Save