Skip to content
Myr

Reject U+001F in string literals (fix #2909)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by itchyny · committed by Nico Williams · parent e526df1 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/jv_parse.c+1 added-1 removed
491 unmodified lines
492 default:493 return "Invalid escape";494 }495 } else {496 if (c > 0 && c < 0x001f)496 if (c >= 0 && c <= 0x001f)497 return "Invalid string: control characters from U+0000 through U+001F must be escaped";498 *out++ = c;499 }500 }
403 unmodified lines