From a4e174938ee62c94f347cbcf3c8c51138c6a7908 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Fri, 11 Aug 2017 23:04:39 +0200 Subject: [PATCH] Fix FIRM whitelist and address check --- source/game/firm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/game/firm.c b/source/game/firm.c index 7512d26..d9c1b3c 100644 --- a/source/game/firm.c +++ b/source/game/firm.c @@ -11,9 +11,9 @@ // valid addresses for FIRM section loading, pairs of start / end address, provided by Wolfvak #define FIRM_VALID_ADDRESS \ - 0x08006000, 0x08800000, \ + 0x08000040, 0x08100000, \ 0x18000000, 0x18600000, \ - 0x1FFF0000, 0x1FFFFFFC, \ + 0x1FF80000, 0x1FFFFFFC, \ 0x20000000, 0x23FFFE00, \ 0x24000000, 0x27FFFB00 @@ -29,7 +29,7 @@ u32 ValidateFirmHeader(FirmHeader* header, u32 data_size) { FirmSectionHeader* section = header->sections + i; if (!section->size) continue; if (section->offset < firm_size) return 1; - if ((section->offset % 512) || (section->address % 512) || (section->size % 512)) return 1; + if ((section->offset % 512) || (section->address % 16) || (section->size % 512)) return 1; if ((header->entry_arm11 >= section->address) && (header->entry_arm11 < section->address + section->size)) section_arm11 = i;