Skip to content

Commit 2973414

Browse files
twcook86danielinux
authored andcommitted
Fix bug due to uninitialized update partition state variable.
1 parent 27b89f0 commit 2973414

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/update_flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ static int RAMFUNCTION wolfBoot_swap_and_final_erase(int resume)
422422
struct wolfBoot_image boot[1];
423423
struct wolfBoot_image update[1];
424424
struct wolfBoot_image swap[1];
425-
uint8_t updateState;
425+
uint8_t updateState = IMG_STATE_NEW;
426426
int eraseLen = (WOLFBOOT_SECTOR_SIZE
427427
#ifdef NVM_FLASH_WRITEONCE /* need to erase the redundant sector too */
428428
* 2

0 commit comments

Comments
 (0)