SERVER-97413Open
Improve spatial memory safety of BSON library in the face of corrupt BSON
Right now the BSON parsing library assumes that bson is well-formed. This is generally valid because we do validation when accepting messages over the network, our disk images are crc32c-checked, and all bson we generate internally should be inherently well formed. That said, we would benefit from some defense in depth to limit the damage if ill-formed BSON makes its way into a {{BSONObj}} or similar types. Here is a non-exhaustive list of things we can do to improve this: First the things th