mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 19:38:09 +00:00
fix out-of-bounds read (for debug_link)
Pinmatrix should always be null-terminated for debug-link. The memset overwrote the terminating nul character.
This commit is contained in:
parent
c4e1c5953e
commit
a7158f39a5
@ -69,7 +69,7 @@ void pinmatrix_done(char *pin)
|
||||
}
|
||||
i++;
|
||||
}
|
||||
memset(pinmatrix_perm, 'X', sizeof(pinmatrix_perm));
|
||||
memset(pinmatrix_perm, 'X', sizeof(pinmatrix_perm) - 1);
|
||||
}
|
||||
|
||||
#if DEBUG_LINK
|
||||
|
Loading…
Reference in New Issue
Block a user