1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-17 10:51:00 +00:00

feat(crypto): clear internal BIP32 & BIP39 caches

This commit is contained in:
Christian Reitter 2022-02-17 11:54:38 +01:00 committed by Andrew Kozlik
parent dbc070976e
commit 49f2c5e7ea

View File

@ -84,6 +84,15 @@ void fuzzer_reset_state(void) {
// reset the PRNGs to make individual fuzzer runs deterministic
srand(0);
random_reseed(0);
// clear internal caches
// note: this is not strictly required for all fuzzer targets
#if USE_BIP32_CACHE
bip32_cache_clear();
#endif
#if USE_BIP39_CACHE
bip39_cache_clear();
#endif
}
void crash(void) {