Skip to content

Commit b66dad3

Browse files
committed
[nrf noup] loader: Do not interpret compressed data
Do not interpret compressed image data as a valid reset vector value in during the image validation. Ref: NCSDK-34929 Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
1 parent b141056 commit b66dad3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

boot/bootutil/src/loader.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,13 @@ boot_validate_slot(struct boot_loader_state *state, int slot,
846846
fih_rc = FIH_NO_BOOTABLE_IMAGE;
847847
goto out;
848848
}
849+
#ifdef MCUBOOT_DECOMPRESS_IMAGES
850+
if (MUST_DECOMPRESS(fap, BOOT_CURR_IMG(state), secondary_hdr)) {
851+
BOOT_LOG_DBG("Image %d is compressed, skipping reset vector address check",
852+
BOOT_CURR_IMG(state));
853+
check_addresses = false;
854+
}
855+
#endif /* MCUBOOT_DECOMPRESS_IMAGES */
849856
#endif
850857

851858
BOOT_LOG_DBG("Image %d expected load address 0x%x", BOOT_CURR_IMG(state), internal_img_addr);

0 commit comments

Comments
 (0)