Commit 94360d5b authored by INFINEON\DovhalA's avatar INFINEON\DovhalA Committed by David Brown
Browse files

Fix possible array index overflow in loader.c: fill_rsp()

parent 472d4c7f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -182,6 +182,10 @@ fill_rsp(struct boot_loader_state *state, struct boot_rsp *rsp)
            break;
        }
    }
    /* At least one image must be active, otherwise skip the execution */
    if (BOOT_CURR_IMG(state) >= BOOT_IMAGE_NUMBER) {
        return;
    }
#endif

#if defined(MCUBOOT_DIRECT_XIP) || defined(MCUBOOT_RAM_LOAD)