mirror of
https://github.com/nlohmann/json.git
synced 2026-10-12 17:37:15 +00:00
State the exact input size limit of json_document
The check rejects inputs of 0xFFFFFFF0 bytes or more, but the exception message and the documentation said 4 GiB. Name the limit once (max_input_size), and state 4 GiB minus 16 bytes in the message and the documentation. Test the limit with a container that only claims the size. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
8 files changed
+51
-11
No files matched your search
@@ -1056,12 +1056,12 @@ MessagePack's ext type and BSON's binary subtype are each stored in a single byt
|
||||
|
||||
[`basic_json_document::parse()`](../api/basic_json_document/parse.md) and the other parsing functions of
|
||||
[`basic_json_document`](../api/basic_json_document/index.md) index a value's position in the source text in 32 bits,
|
||||
so they do not support an input of 4 GiB or more.
|
||||
so they do not support an input of 4294967280 bytes (4 GiB minus 16 bytes) or more.
|
||||
|
||||
!!! failure "Example message"
|
||||
|
||||
```
|
||||
[json.exception.out_of_range.416] input of 4 GiB or more is not supported by json_document
|
||||
[json.exception.out_of_range.416] input of 4294967280 bytes or more is not supported by json_document
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
Reference in new issue
Block a user