Skip to content

Commit

Permalink
Fix incorrect address check in CalculateChecksum (close #6)
Browse files Browse the repository at this point in the history
  • Loading branch information
bessman committed Dec 23, 2024
1 parent 5e1616d commit 973a8cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mcc_generated_files/boot/boot_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ static enum BOOT_COMMAND_RESULT CalculateChecksum(void)

memcpy(&response, commandArray, sizeof(struct CMD_STRUCT_0));

if ( IsLegalRange(pCommand->address, pCommand->address+pCommand->dataLength-1))
if ( IsLegalRange(pCommand->address, pCommand->address+pCommand->dataLength / 2))
{
for (count = 0; count < pCommand->dataLength; count += 4)
{
Expand Down

0 comments on commit 973a8cf

Please sign in to comment.