Skip to content

Commit 896163d

Browse files
committed
Drop the unreachable sector-size guard in the swap backup version read
1 parent 3eaf2f0 commit 896163d

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎src/update_flash.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -619,9 +619,6 @@ static int RAMFUNCTION wolfBoot_swap_backup_version(uint32_t *ver)
619619
struct wolfBoot_image swap;
620620
uint8_t *field = NULL;
621621

622-
/* SWAP holds one sector, which then cannot hold the whole header */
623-
if (sizeof(hdr) > WOLFBOOT_SECTOR_SIZE)
624-
return -1;
625622
wolfBoot_open_image(&swap, PART_SWAP);
626623
#ifdef NVM_FLASH_ECC
627624
/* A read of erased ECC flash can fault */

0 commit comments

Comments
 (0)