Skip to content

Commit

Permalink
Reject U+001F in string literals (fix jqlang#2909)
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed Sep 26, 2023
1 parent 8f81668 commit 8095f7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jv_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8095f7e

Please sign in to comment.