Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

itchyny
Copy link
Contributor

@itchyny itchyny commented Sep 26, 2023

This fixes the bounding check errors as reported by #2909.

Copy link
Member

@wader wader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth to have some regression test for this? spent some time trying to one but didn't come up with any neat way. I guess not possible as a jq query (implode will escape)? so maybe something in shtest?

S=""; for i in $(seq 0 1 255) ; do printf "\"\\$(printf %03o $i)\"" | jq >/dev/null 2>&1 ; if [ $? != 0 ]; then S="$S $i"; fi ; done ; echo $S
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 34 92

@nicowilliams nicowilliams merged commit 0714939 into jqlang:master Sep 26, 2023
28 checks passed
@nicowilliams
Copy link
Contributor

Thanks!

@emanuele6 emanuele6 added the bug label Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants