Skip to content

Commit 7e3a1ce

Browse files
de-nordicnvlsianpu
authored andcommitted
boot: Add missing boot_enc_init
The boot_enc_set_key in boot_swap_image, when recovering from reset, has been caled on AES context that has not been initialized. Signed-off-by: Dominik Ermel <[email protected]>
1 parent 4da4a72 commit 7e3a1ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: boot/bootutil/src/loader.c

+2
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,8 @@ boot_swap_image(struct boot_loader_state *state, struct boot_status *bs)
15941594
}
15951595
}
15961596

1597+
boot_enc_init(BOOT_CURR_ENC(state), slot);
1598+
15971599
if (i != BOOT_ENC_KEY_SIZE) {
15981600
boot_enc_set_key(BOOT_CURR_ENC(state), slot, bs);
15991601
}

0 commit comments

Comments
 (0)