storage: add compile-time assert for sizeof(Storage) validation

This commit is contained in:
Roman Zeyde 2015-09-06 21:14:23 +03:00
parent 8372504238
commit c08ff09f0f
1 changed files with 1 additions and 0 deletions

View File

@ -39,6 +39,7 @@
#include "protect.h"
#include "layout2.h"
_Static_assert(sizeof(Storage) <= FLASH_STORAGE_LEN, "Storage struct is too large for TREZOR flash");
Storage storage;
uint8_t storage_uuid[12];