1
0
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:
Pavol Rusnak 2017-04-01 13:53:08 +02:00
parent 74db11cbfc
commit 300daa4513
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -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;
}