PYTHON-6163ClosedFixed

Pure-Python decode_all silently accepts 1-byte invalid BSON

h3. Detailed steps to reproduce the problem? {{bson.decode_all()}} disagrees between the C extension and the pure-Python implementation for a 1-byte input. The C extension raises {{InvalidBSON}}. The pure-Python implementation returns {{[]}}. h3. Definition of done: what must be done to consider the task complete? - The pure-Python implementation raises {{InvalidBSON}} for a 1-byte buffer, matching the C extension. Empty input ({{b""}}) must still return {{[]}}. - Pytest regress

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

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

No labels assigned.