Commit 3589fb9
committed
boot: bootutil: swap-offset: Fix image size check during validation
When checking the size of an image in bootutil_img_validate, the offset
to the end of the TLV area was used as the image size in all cases.
However, when using swap-offset, the upgrade image is written in the
secondary with an offset. This offset is not part of the image and must
therefore not be taken into account in the image size.
Signed-off-by: Thomas Altenbach <thomas.altenbach@legrand.com>1 parent bd9e33c commit 3589fb9
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| 493 | + | |
493 | 494 | | |
494 | 495 | | |
495 | 496 | | |
| |||
555 | 556 | | |
556 | 557 | | |
557 | 558 | | |
558 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
559 | 566 | | |
560 | 567 | | |
561 | 568 | | |
| |||
0 commit comments