mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-12 18:49:07 +00:00
bootloader: lock flash/turn off sdcard when header invalid
This commit is contained in:
parent
74db11cbfc
commit
300daa4513
@ -87,7 +87,9 @@ bool copy_sdcard(void)
|
||||
|
||||
image_header hdr;
|
||||
if (!image_parse_header((const uint8_t *)buf, &hdr)) {
|
||||
BOOTLOADER_PRINTLN("wrong header");
|
||||
BOOTLOADER_PRINTLN("invalid header");
|
||||
sdcard_power_off();
|
||||
HAL_FLASH_Lock();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user