PYTHON-6252ClosedFixed

Fix signed-integer-overflow UB in bson buffer doubling past 1GiB

h3. Detailed steps to reproduce the problem? _Include full traceback, if possible_ The sanitizer Evergreen task (PYTHON-6048 [patch|https://spruce.corp.mongodb.com/task/mongo_python_driver_sanitizer_rhel8_test_sanitizer_patch_16d94e2b6ba2e11f93d344b55e9ecb237451d35f_6af30ecc1fe3e50007d15d0b_26_11_10_12_32_14/logs?execution=0]) dies silently (exit 1, no output) at {{{}test/test_bson.py::TestBSON::test_encode_size_limit{}}}: {{buffer_grow}} in {{bson/buffer.c}} doubles an {{int}} size while

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
4.20.0
Components
Server components related to this issue
BSON
Labels
Tags and classification

No labels assigned.