We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1b35d0 commit 91adb2aCopy full SHA for 91adb2a
src/libbson/tests/test-bson.c
@@ -1886,11 +1886,7 @@ test_bson_reserve_buffer_errors (void)
1886
uint32_t len_le;
1887
1888
/* too big */
1889
- ASSERT (!bson_reserve_buffer (&bson, (uint32_t) (BSON_MAX_SIZE - bson.len + 1u)));
1890
- /* exactly the maximum size */
1891
-#if BSON_WORD_SIZE > 32
1892
- ASSERT (bson_reserve_buffer (&bson, (uint32_t) (BSON_MAX_SIZE - bson.len)));
1893
-#endif
+ ASSERT (!bson_reserve_buffer (&bson, (uint32_t) (INT32_MAX - bson.len - 1)));
1894
1895
/* make a static bson, it refuses bson_reserve_buffer since it's read-only */
1896
bson_destroy (&bson);
0 commit comments