Reject U+001F in string literals (fix #2909)
This commit is contained in:
1 parent
e526df15fe
commit
07149397d1
1 file changed
+1
-1
+1
-1
@@ -493,7 +493,7 @@ static pfunc found_string(struct jv_parser* p) {
|
||||
return "Invalid escape";
|
||||
}
|
||||
} else {
|
||||
if (c > 0 && c < 0x001f)
|
||||
if (c >= 0 && c <= 0x001f)
|
||||
return "Invalid string: control characters from U+0000 through U+001F must be escaped";
|
||||
*out++ = c;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user