-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Null bytes in files are treated like EOF #1095
Copy link
Copy link
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
Activity
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
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
\0as EOF to properly parse string literals.Parse file https://github.com/nst/JSONTestSuite/blob/master/test_parsing/n_multidigit_number_then_00.json, e.g. by
Parse error: unexpected null byte after reading
123.The file is successfully parsed as number
123.Apple LLVM version 9.1.0.
developbranch?develop.N/A