Auditing a C record decoder

A C decoder receives an unsigned char buffer p containing n bytes. Its first two bytes encode an unsigned 16-bit payload length in big-endian order; the payload follows immediately. Assume 8-bit bytes, an available uint32_t type, and that n and the decoded length L have type size_t. Select every portable and valid claim.

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Serialization Questions: