Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential type size mismatch through pointers
size_t can be 64-bits while unsigned int is smaller. This causes issues when option_length is accessed through the pointer x in coap_parse_message(). The option length and delta are at most a 16-bit unsigned integer plus 269 according to RFC 7252. Changing option_number, option_delta, and option_length to uint32_t and x to uint32_t * fixes eclipse-wakaama#429. This also ensures sufficient size even if used on a platform with smaller integers. Signed-off-by: Scott Bertin <[email protected]>
- Loading branch information