SERVER-120272ClosedFixed

BSONElement size computation is also responsible for validating the element type

* valuesize() uses element type to check size. * It needs to validate all bits of the type, not just the low 5 bits. One option (not the only one) is to use a 256-byte static array, rather than a 32-byte one.

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc0
Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.