Skip to content

Commit 1d54d84

Browse files
davidvinczed3zd3z
authored andcommitted
boot: Fix false error condition in direct-xip mode
A false error condition occurs from v1.7.0 when all the optional features are disabled in direct-xip mode. Change-Id: I1e5f5e87f4f393c276372ae98947bd80c22fc163 Signed-off-by: David Vincze <david.vincze@arm.com>
1 parent 4aa516e commit 1d54d84

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

boot/bootutil/src/loader.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2016-2020 Linaro LTD
55
* Copyright (c) 2016-2019 JUUL Labs
6-
* Copyright (c) 2019-2020 Arm Limited
6+
* Copyright (c) 2019-2021 Arm Limited
77
*
88
* Original license:
99
*
@@ -2322,6 +2322,15 @@ context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp)
23222322
* version.
23232323
*/
23242324
continue;
2325+
} else {
2326+
/* An image with a greater version number has
2327+
* been found.
2328+
* Sanitize the 'rc' variable to prevent the
2329+
* occurrence of a false error condition (its value
2330+
* may not be overwritten until the end of the
2331+
* function).
2332+
*/
2333+
rc = 0;
23252334
}
23262335
}
23272336
selected_slot = slot;

0 commit comments

Comments
 (0)