mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 02:04:39 +08:00
Check if bootloader segment is within bounds
This commit is contained in:
parent
77c5e28bce
commit
248b109c9a
1 changed files with 4 additions and 0 deletions
|
@ -173,6 +173,10 @@ static int check_segs(flash_file_t *ctx, int can_write_bl) {
|
|||
PrintAndLogEx(ERR, "Attempted to write bootloader but bootloader writes are not enabled");
|
||||
return -1;
|
||||
}
|
||||
if (can_write_bl && seg->start < BOOTLOADER_END && (seg->start + seg->length > BOOTLOADER_END)) {
|
||||
PrintAndLogEx(ERR, "Error: Segment is outside of bootloader bounds");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue