mirror of
https://github.com/json-c/json-c.git
synced 2026-04-08 14:59:06 +08:00
Fix issue #53 - ensure explicit length string are still NUL terminated, and fix json_tokener_parse() to work properly with embedded unicode \u0000 values in strings.
Adjust test_null to check for this case. See also http://bugs.debian.org/687269
This commit is contained in:
@@ -393,7 +393,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
|
||||
while(1) {
|
||||
if(c == tok->quote_char) {
|
||||
printbuf_memappend_fast(tok->pb, case_start, str-case_start);
|
||||
current = json_object_new_string(tok->pb->buf);
|
||||
current = json_object_new_string_len(tok->pb->buf, tok->pb->bpos);
|
||||
saved_state = json_tokener_state_finish;
|
||||
state = json_tokener_state_eatws;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user