From d802e5329c858956d3befa80e832721a7d9e6c09 Mon Sep 17 00:00:00 2001 From: Aurora Wright Date: Sat, 3 Jun 2017 01:02:52 +0200 Subject: [PATCH] Fix overlap check --- source/firm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/firm.c b/source/firm.c index 85ccb41..967f848 100755 --- a/source/firm.c +++ b/source/firm.c @@ -450,7 +450,7 @@ bool checkFirmPayload(u32 payloadSize) if((section->offset < 0x200) || (section->address + section->size < section->address) || //Overflow check ((u32)section->address & 3) || (section->offset & 0x1FF) || (section->size & 0x1FF) || //Alignment check - (overlaps((u32)section->address, (u32)section->address + section->size, (u32)firm + section->offset, (u32)firm + size)) || + (overlaps((u32)section->address, (u32)section->address + section->size, (u32)firm, (u32)firm + size)) || ((!inRange((u32)section->address, (u32)section->address + section->size, 0x08000000, 0x08000000 + 0x00100000)) && (!inRange((u32)section->address, (u32)section->address + section->size, 0x18000000, 0x18000000 + 0x00600000)) && (!inRange((u32)section->address, (u32)section->address + section->size, 0x1FF00000, 0x1FFFFC00)) &&