Commit 4a4d1ace authored by Dominik Ermel's avatar Dominik Ermel Committed by David Brown
Browse files

boot: Fix log reporting magic from incorrect header

Magic for different header was reported than the one that had failed
the check.

Signed-off-by: default avatarDominik Ermel <dominik.ermel@nordicsemi.no>
parent 6693067b
Loading
Loading
Loading
Loading
+1 −1
Changes for boot/bootutil/src/loader.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -2027,7 +2027,7 @@ context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp)
         */
        if (BOOT_IMG(state, BOOT_PRIMARY_SLOT).hdr.ih_magic != IMAGE_MAGIC) {
            BOOT_LOG_ERR("bad image magic 0x%lx; Image=%u", (unsigned long)
                         &boot_img_hdr(state,BOOT_PRIMARY_SLOT)->ih_magic,
                         BOOT_IMG(state, BOOT_PRIMARY_SLOT).hdr.ih_magic,
                         BOOT_CURR_IMG(state));
            rc = BOOT_EBADIMAGE;
            goto out;