Skip to content

Commit

Permalink
AVRISP-MKII Clone: Fix bounds check of XPROG command buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
abcminiuser committed Jan 16, 2022
1 parent 9e5f147 commit fced96d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ static void XPROGProtocol_ReadMemory(void)
ReadMemory_XPROG_Params.Address = SwapEndian_32(ReadMemory_XPROG_Params.Address);
ReadMemory_XPROG_Params.Length = SwapEndian_16(ReadMemory_XPROG_Params.Length);

if (ReadMemory_XPROG_Params.Length >= sizeof(ReadBuffer))
if (ReadMemory_XPROG_Params.Length > sizeof(ReadBuffer))
{
Endpoint_StallTransaction();
return;
Expand Down

0 comments on commit fced96d

Please sign in to comment.