1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-15 09:50:57 +00:00

config: Fix pointer arithmetic in config_upgrade_v10().

This commit is contained in:
Andrew Kozlik 2019-02-22 13:33:18 +01:00 committed by Pavol Rusnak
parent 276cd4b44a
commit a7a9eab445
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -255,7 +255,7 @@ static secbool config_upgrade_v10(void)
// Erase newly added fields.
if (old_config_size != sizeof(Storage)) {
memzero(&config + old_config_size, sizeof(Storage) - old_config_size);
memzero((char*)&config + old_config_size, sizeof(Storage) - old_config_size);
}
const uint32_t FLASH_STORAGE_PINAREA = FLASH_META_START + 0x4000;