diff options
| author | Pali Rohár <[email protected]> | 2022-08-27 14:48:10 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-08-31 12:21:47 -0400 |
| commit | 5acfdfbd43bfc4964dade2f8b085b26dc24a9dcd (patch) | |
| tree | 15d9b25f24a14f1e4537f162e9426b1cb2f82e62 /boot/bootm.c | |
| parent | 88de6c512758f9705a14965ab97f11b463f3fa7c (diff) | |
bootm: Fix upper bound of FDT overlap checks
FTD blob can be put immediately after the OS image.
So use strict inequality for start address check.
Fixes: fbde7589ce30 ("common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image")
Signed-off-by: Pali Rohár <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'boot/bootm.c')
| -rw-r--r-- | boot/bootm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/boot/bootm.c b/boot/bootm.c index 29c067fae7e..e3233fdf89d 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -305,9 +305,9 @@ int bootm_find_images(int flag, int argc, char *const argv[], ulong start, /* check if FDT overlaps OS image */ if (images.ft_addr && (((ulong)images.ft_addr >= start && - (ulong)images.ft_addr <= start + size) || + (ulong)images.ft_addr < start + size) || ((ulong)images.ft_addr + images.ft_len >= start && - (ulong)images.ft_addr + images.ft_len <= start + size))) { + (ulong)images.ft_addr + images.ft_len < start + size))) { printf("ERROR: FDT image overlaps OS image (OS=0x%lx..0x%lx)\n", start, start + size); return 1; |
