You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mkdocs/docs/home/exceptions.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -898,6 +898,22 @@ A JSON Patch `add` operation cannot be applied because the target location's par
898
898
899
899
This exception was added in version 3.13.0. Before that, this situation hit an internal assertion (aborting the program in debug builds) or was silently ignored when assertions were disabled.
900
900
901
+
### json.exception.out_of_range.412
902
+
903
+
BSON stores the length of documents, arrays, strings, and binary values in a signed 32-bit integer. This exception is thrown when a value is too large to be described by such a length field.
904
+
905
+
!!! failure "Example message"
906
+
907
+
```
908
+
BSON length 2147483661 exceeds maximum of 2147483647
909
+
```
910
+
911
+
!!! note
912
+
913
+
This exception was added in version 3.13.0. Before that, the length was silently truncated, and
914
+
[`to_bson`](../api/basic_json/to_bson.md) produced documents with negative length prefixes that
CHECK_THROWS_WITH_AS(huge_binary_json::to_bson(j), "[json.exception.out_of_range.412] BSON length 2147483661 exceeds maximum of 2147483647", huge_binary_json::out_of_range&);
112
+
}
113
+
83
114
SECTION("string length must be at least 1")
84
115
{
85
116
// from https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11175
0 commit comments