This PR updates MXC_SYS_GetUSN to prevent buffer overflow. The application-side buffer should be MXC_SYS_USN_LEN, but we were using MXC_SYS_USN_CHECKSUM_LEN which is a larger buffer size with some additional padding used for the internal CRC calculation.
Checklist Before Requesting Review
[ ] PR Title follows correct guidelines.
[ ] Description of changes and all other relevant information.
[ ] (Optional) Link any related GitHub issues using a keyword
[ ] (Optional) Provide info on any relevant functional testing/validation. For API changes or significant features, this is not optional.
Description
Fixes #1006
This PR updates
MXC_SYS_GetUSN
to prevent buffer overflow. The application-side buffer should beMXC_SYS_USN_LEN
, but we were usingMXC_SYS_USN_CHECKSUM_LEN
which is a larger buffer size with some additional padding used for the internal CRC calculation.Checklist Before Requesting Review