Skip to content

Commit

Permalink
[#268] Fix one-off index check
Browse files Browse the repository at this point in the history
  • Loading branch information
Donnie-Ice committed Aug 5, 2024
1 parent 391e764 commit 83e2b45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sa/internal/sa_interface_inmemory.template.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ static int32_t sa_get_from_spi(uint16_t spi, SecurityAssociation_t** security_as
{
int32_t status = CRYPTO_LIB_SUCCESS;
// Check if spi index in sa array
if (spi > NUM_SA)
if (spi >= NUM_SA)
{
return CRYPTO_LIB_ERR_SPI_INDEX_OOB;
}
Expand Down

0 comments on commit 83e2b45

Please sign in to comment.