msdk icon indicating copy to clipboard operation
msdk copied to clipboard

fix(PeriphDrivers): Fix `MXC_SYS_GetUSN` Buffer Overflow

Open Jake-Carter opened this issue 9 months ago • 0 comments

Description

Fixes #1006

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.

Jake-Carter avatar May 13 '24 22:05 Jake-Carter