Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
None
-
None
-
None
Description
The sizeof operator is invoked on the wrong argument
Defect 102291 (STATIC_C)
Checker SIZEOF_MISMATCH (subcategory wrong_sizeof)
File: /src/bson/bson-reader.c
Function _bson_reader_data_read
/src/bson/bson-reader.c, line: 574
Passing argument "&reader->data[reader->offset]" of type "uint8_t const " and argument "4UL" ("sizeof (blen)") to function "memcpy" is suspicious because "sizeof (uint8_t const) /*1/" is expected.
memcpy (&blen, &reader->data[reader->offset], sizeof blen);
|