mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 11:28:14 +00:00
Before checking the PIN sleep for 2^ctr - 1 seconds instead of 2^(ctr-1) seconds.
This commit is contained in:
parent
13b256ab2c
commit
94cb1a4dbe
@ -744,8 +744,8 @@ secbool storage_unlock(uint32_t pin)
|
|||||||
return secfalse;
|
return secfalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sleep for 2^(ctr-1) seconds before checking the PIN.
|
// Sleep for 2^ctr - 1 seconds before checking the PIN.
|
||||||
uint32_t wait = (1 << ctr) >> 1;
|
uint32_t wait = (1 << ctr) - 1;
|
||||||
uint32_t progress;
|
uint32_t progress;
|
||||||
for (uint32_t rem = wait; rem > 0; rem--) {
|
for (uint32_t rem = wait; rem > 0; rem--) {
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user