Skip to content

Commit

Permalink
fix(PeriphDrivers): Resize the USN buffer in checksum verification fo…
Browse files Browse the repository at this point in the history
…r MAX32655, MAX32662, and MAX32670 (#1192)
  • Loading branch information
crsz20 authored Sep 25, 2024
1 parent e27c3cd commit 0a0614f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Libraries/PeriphDrivers/Source/SYS/sys_me12.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int MXC_SYS_GetUSN(uint8_t *usn, uint8_t *checksum)
// Set NULL Key
MXC_AES_SetExtKey((const void *)aes_key, MXC_AES_128BITS);

uint8_t usn_copy[MXC_SYS_USN_LEN] = { 0 };
uint8_t usn_copy[MXC_SYS_USN_CHECKSUM_LEN] = { 0 };
memcpy(usn_copy, usn, MXC_SYS_USN_LEN);
// Compute Checksum
mxc_aes_req_t aes_req;
Expand Down
2 changes: 1 addition & 1 deletion Libraries/PeriphDrivers/Source/SYS/sys_me15.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ int MXC_SYS_GetUSN(uint8_t *usn, uint8_t *checksum)
// Set NULL Key
MXC_AES_SetExtKey((const void *)aes_key, MXC_AES_128BITS);

uint8_t usn_copy[MXC_SYS_USN_LEN] = { 0 };
uint8_t usn_copy[MXC_SYS_USN_CHECKSUM_LEN] = { 0 };
memcpy(usn_copy, usn, MXC_SYS_USN_LEN);

// Compute Checksum
Expand Down
2 changes: 1 addition & 1 deletion Libraries/PeriphDrivers/Source/SYS/sys_me17.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int MXC_SYS_GetUSN(uint8_t *usn, uint8_t *checksum)
// Set NULL Key
MXC_AES_SetExtKey((const void *)aes_key, MXC_AES_128BITS);

uint8_t usn_copy[MXC_SYS_USN_LEN] = { 0 };
uint8_t usn_copy[MXC_SYS_USN_CHECKSUM_LEN] = { 0 };
memcpy(usn_copy, usn, MXC_SYS_USN_LEN);

// Compute Checksum
Expand Down

0 comments on commit 0a0614f

Please sign in to comment.