Merge pull request #1365 from scott4290/master

Update flash.c
This commit is contained in:
Iceman 2021-07-11 22:30:13 +02:00 committed by GitHub
commit 1138f2b7ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,7 +123,8 @@ static int build_segs_from_phdrs(flash_file_t *ctx, FILE *fd, Elf32_Phdr *phdrs,
if (paddr < FLASH_START || (paddr + filesz) > flash_end) { if (paddr < FLASH_START || (paddr + filesz) > flash_end) {
PrintAndLogEx(ERR, "Error: PHDR is not contained in Flash"); PrintAndLogEx(ERR, "Error: PHDR is not contained in Flash");
if ((paddr + filesz) > flash_end) { if ((paddr + filesz) > flash_end) {
PrintAndLogEx(ERR, "Firmware probably too big for your device"); PrintAndLogEx(ERR, "Firmware is probably too big for your device");
PrintAndLogEx(ERR, "See README.md for information on compiling for platforms with 256KB of flash memory");
} }
return PM3_EFILE; return PM3_EFILE;
} }