Skip to content

Commit

Permalink
drivers/bio: bug: Out-of-bounds fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasblixt committed Apr 15, 2023
1 parent 0cd607c commit 7a617b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drivers/block/bio.c
Expand Up @@ -23,7 +23,7 @@ static unsigned int n_bios = 0;

static int check_dev(bio_dev_t dev)
{
if (dev < 0 || dev > CONFIG_DRIVERS_BIO_MAX_DEVS)
if (dev < 0 || dev >= CONFIG_DRIVERS_BIO_MAX_DEVS)
return -PB_ERR_PARAM;
if (bio_pool[dev].valid == false)
return -PB_ERR_PARAM;
Expand Down

0 comments on commit 7a617b5

Please sign in to comment.