mirror of
https://github.com/LedgerHQ/openpgp-card-app
synced 2024-11-09 07:10:30 +00:00
Fix screen message buffer overwrite
This commit is contained in:
parent
1d16c87fc8
commit
6983d8cbb8
@ -425,7 +425,7 @@ static void validate_pin() {
|
||||
sizeof(G_gpg_vstate.menu),
|
||||
" %d tries remaining",
|
||||
pin->counter);
|
||||
ui_info(WRONG_PIN, EMPTY, ui_menu_main_display, 0);
|
||||
ui_info(WRONG_PIN, G_gpg_vstate.menu, ui_menu_main_display, 0);
|
||||
return;
|
||||
}
|
||||
offset = 1 + G_gpg_vstate.work.io_buffer[0];
|
||||
|
@ -329,11 +329,11 @@ static void validate_pin() {
|
||||
gpg_io_insert_u16(sw);
|
||||
gpg_io_do(IO_RETURN_AFTER_TX);
|
||||
if (sw != SW_OK) {
|
||||
snprintf(G_gpg_vstate.menu,
|
||||
sizeof(G_gpg_vstate.menu),
|
||||
snprintf(G_gpg_vstate.ux_buff1,
|
||||
sizeof(G_gpg_vstate.ux_buff1),
|
||||
" %d tries remaining",
|
||||
pin->counter);
|
||||
ui_info(WRONG_PIN, G_gpg_vstate.menu);
|
||||
ui_info(WRONG_PIN, G_gpg_vstate.ux_buff1);
|
||||
} else {
|
||||
ui_menu_main_display(0);
|
||||
}
|
||||
@ -354,11 +354,11 @@ static void validate_pin() {
|
||||
gpg_io_discard(1);
|
||||
gpg_io_insert_u16(SW_CONDITIONS_NOT_SATISFIED);
|
||||
gpg_io_do(IO_RETURN_AFTER_TX);
|
||||
snprintf(G_gpg_vstate.menu,
|
||||
sizeof(G_gpg_vstate.menu),
|
||||
snprintf(G_gpg_vstate.ux_buff1,
|
||||
sizeof(G_gpg_vstate.ux_buff1),
|
||||
" %d tries remaining",
|
||||
pin->counter);
|
||||
ui_info(WRONG_PIN, EMPTY);
|
||||
ui_info(WRONG_PIN, G_gpg_vstate.ux_buff1);
|
||||
return;
|
||||
}
|
||||
offset = 1 + G_gpg_vstate.work.io_buffer[0];
|
||||
|
Loading…
Reference in New Issue
Block a user