-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
state: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated
Description
- What is the issue you have?
When reading parsing JSON from a file, null bytes are treated as EOF. The reason for this is explicit code in the JSON lexer to treat \0 as EOF to properly parse string literals.
- Please describe the steps to reproduce the issue. Can you provide a small but working code example?
Parse file https://github.com/nst/JSONTestSuite/blob/master/test_parsing/n_multidigit_number_then_00.json, e.g. by
std::ifstream f("n_multidigit_number_then_00.json");
json::parse(f);- What is the expected behavior?
Parse error: unexpected null byte after reading 123.
- And what is the actual behavior instead?
The file is successfully parsed as number 123.
- Which compiler and operating system are you using? Is it a supported compiler?
Apple LLVM version 9.1.0.
- Did you use a released version of the library or the version from the
developbranch?
develop.
- If you experience a compilation error: can you compile and run the unit tests?
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
state: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated