Skip to content

Commit 6ef9c7b

Browse files
authored
[CDRIVER-6017] Reduce BSON_VALIDATION_MAX_NESTING_DEPTH to 500 (#2036)
To fix stack overflow encountered on MSVC on r1.30 branch. Likely caused by default over-alignment of `bson_t` and `bson_iter_t` removed in 2.0.
1 parent 3e3941b commit 6ef9c7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libbson/src/bson/validate-private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ enum {
1515
* server might accept. The main purpose of this limit is to prevent stack
1616
* overflow, not to reject invalid data.
1717
*/
18-
BSON_VALIDATION_MAX_NESTING_DEPTH = 1000,
18+
BSON_VALIDATION_MAX_NESTING_DEPTH = 500,
1919
};
2020

2121
/**

0 commit comments

Comments
 (0)