Comment 8 for bug 1850608

Revision history for this message
Brian Foster (blfoster) wrote :

I suspect this is what is happening:

  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!).