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

[bug]accept invalid numbers #56

Open
Dongmuliang opened this issue Dec 27, 2022 · 1 comment
Open

[bug]accept invalid numbers #56

Dongmuliang opened this issue Dec 27, 2022 · 1 comment

Comments

@Dongmuliang
Copy link

The parser accepts invalid numbers (i.e., leading zeros).
This is not allowed according to the specification in section 2.4.

It can be reproduced with the input:
{"a":00000000}

@Dongmuliang Dongmuliang changed the title accept invalid numbers [bug]accept invalid numbers Dec 27, 2022
@boofish
Copy link

boofish commented Jul 6, 2023

also accept invalid strings (i.e., containing unescaped control characters), which is not allowed according to the section 7 of specification.

It can be reproduced with the following buf:

char buf[4];
buf[0] = '\"';
buf[1] = 1; // this is unescaped control characters
buf[2] = '\"';
buf[3] = 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants