Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nrf fromtree] boot: Fix swap-move algorithm failing to validate mult… #299

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion boot/bootutil/src/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright (c) 2016-2020 Linaro LTD
* Copyright (c) 2016-2019 JUUL Labs
* Copyright (c) 2019-2023 Arm Limited
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* Original license:
*
Expand Down Expand Up @@ -2372,8 +2373,13 @@ context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp)
if (BOOT_SWAP_TYPE(state) != BOOT_SWAP_TYPE_NONE) {
/* Attempt to read an image header from each slot. Ensure that image
* headers in slots are aligned with headers in boot_data.
* Note: Quite complicated internal logic of boot_read_image_headers
* uses boot state, the last parm, to figure out in which slot which
* header is located; when boot state is not provided, then it
* is assumed that headers are at proper slots (we are not in
* the middle of moving images, etc).
*/
rc = boot_read_image_headers(state, false, &bs);
rc = boot_read_image_headers(state, false, NULL);
if (rc != 0) {
FIH_SET(fih_rc, FIH_FAILURE);
goto out;
Expand Down
Loading