diff options
-rw-r--r-- | common/bootm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/common/bootm.c b/common/bootm.c index b3377490b3e..167eea4a1e9 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -256,9 +256,11 @@ int bootm_find_images(int flag, int argc, char *const argv[], ulong start, /* check if ramdisk overlaps OS image */ if (images.rd_start && (((ulong)images.rd_start >= start && - (ulong)images.rd_start <= start + size) || - ((ulong)images.rd_end >= start && - (ulong)images.rd_end <= start + size))) { + (ulong)images.rd_start < start + size) || + ((ulong)images.rd_end > start && + (ulong)images.rd_end <= start + size) || + ((ulong)images.rd_start < start && + (ulong)images.rd_end >= start + size))) { printf("ERROR: RD image overlaps OS image (OS=0x%lx..0x%lx)\n", start, start + size); return 1; |