diff --git a/jv_parse.c b/jv_parse.c index ae2ef7ff..4497c427 100644 --- a/jv_parse.c +++ b/jv_parse.c @@ -257,6 +257,8 @@ static pfunc found_string(struct jv_parser* p) { return "Invalid escape"; } } else { + if (c < 0x001f) + return "Invalid string: control characters from U+0000 through U+001F must be escaped"; *out++ = c; } }