Skip to content

Commit 0714939

Browse files
itchynynicowilliams
authored andcommitted
Reject U+001F in string literals (fix #2909)
1 parent e526df1 commit 0714939

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jv_parse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ static pfunc found_string(struct jv_parser* p) {
493493
return "Invalid escape";
494494
}
495495
} else {
496-
if (c > 0 && c < 0x001f)
496+
if (c >= 0 && c <= 0x001f)
497497
return "Invalid string: control characters from U+0000 through U+001F must be escaped";
498498
*out++ = c;
499499
}

0 commit comments

Comments
 (0)