whoopsie.c::parse_and_upload_report() calls
whoopsie.c::bonsify() to get some length (a size_t) using
bson.c::boson_size(), which calls
platform.h::bson_little_endian32() to convert an unknown
value (presumably 32-bits) of unknown endianness into an
size_t (64-bits) with opaque endianness.
A look at bson_little_endian32() shows it transfers only 4-bytes.
However, a size_t is 8-bytes (on my 64-bit system),
and those bytes are being copied into an *uninitialized* size_t
(in bson_size()). End result is 4 of the 8 bytes returned will
be garbage, hence the bizarre length noted previously.
No fix is proposed, nor do I intend to propose one (sorry!).
I suspect this is what is happening:
whoopsie. c::parse_ and_upload_ report( ) calls c::bonsify( ) to get some length (a size_t) using c::boson_ size(), which calls h::bson_ little_ endian32( ) to convert an unknown
whoopsie.
bson.
platform.
value (presumably 32-bits) of unknown endianness into an
size_t (64-bits) with opaque endianness.
A look at bson_little_ endian32( ) shows it transfers only 4-bytes.
However, a size_t is 8-bytes (on my 64-bit system),
and those bytes are being copied into an *uninitialized* size_t
(in bson_size()). End result is 4 of the 8 bytes returned will
be garbage, hence the bizarre length noted previously.
No fix is proposed, nor do I intend to propose one (sorry!).