Skip to content

Commit 17a6ecd

Browse files
stglooriousde-nordic
authored andcommitted
boot: bootutil: fix image_index definition
image_index is used when when MCUBOOT_BUILTIN_KEY and EXPECTED_SIG_TLV is set, but in this case this variable is never defined. Signed-off-by: Stefan Gloor <[email protected]>
1 parent cc98529 commit 17a6ecd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

boot/bootutil/src/image_validate.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,10 @@ bootutil_img_validate(struct boot_loader_state *state,
204204
int seed_len, uint8_t *out_hash
205205
)
206206
{
207-
#if (defined(EXPECTED_KEY_TLV) && defined(MCUBOOT_HW_KEY)) || defined(MCUBOOT_HW_ROLLBACK_PROT) \
208-
|| defined(MCUBOOT_UUID_VID) || defined(MCUBOOT_UUID_CID)
207+
#if (defined(EXPECTED_KEY_TLV) && defined(MCUBOOT_HW_KEY)) || \
208+
(defined(EXPECTED_SIG_TLV) && defined(MCUBOOT_BUILTIN_KEY)) || \
209+
defined(MCUBOOT_HW_ROLLBACK_PROT) || \
210+
defined(MCUBOOT_UUID_VID) || defined(MCUBOOT_UUID_CID)
209211
int image_index = (state == NULL ? 0 : BOOT_CURR_IMG(state));
210212
#endif
211213
uint32_t off;

0 commit comments

Comments
 (0)