mirror of
https://github.com/LedgerHQ/openpgp-card-app
synced 2024-11-09 07:10:30 +00:00
Replace memmove by strlcpy
This commit is contained in:
parent
710de03cad
commit
b4a5c236ea
@ -1003,7 +1003,7 @@ const bagl_element_t *ui_menu_main_predisplay(const ux_menu_entry_t *entry,
|
||||
if (element->component.userid == 0x21) {
|
||||
memmove(G_gpg_vstate.menu, (void *) (N_gpg_pstate->name.value), 12);
|
||||
if (G_gpg_vstate.menu[0] == 0) {
|
||||
memmove(G_gpg_vstate.menu, "<No Name>", 9);
|
||||
strlcpy(G_gpg_vstate.menu, "<No Name>", 9);
|
||||
} else {
|
||||
for (int i = 0; i < 12; i++) {
|
||||
if (G_gpg_vstate.menu[i] == '<') {
|
||||
|
@ -1208,7 +1208,7 @@ void ui_menu_main_predisplay() {
|
||||
explicit_bzero(G_gpg_vstate.ux_buff1, sizeof(G_gpg_vstate.ux_buff1));
|
||||
memmove(G_gpg_vstate.ux_buff1, (void *) (N_gpg_pstate->name.value), 20);
|
||||
if (G_gpg_vstate.ux_buff1[0] == 0) {
|
||||
memmove(G_gpg_vstate.ux_buff1, "<No Name>", 9);
|
||||
strlcpy(G_gpg_vstate.ux_buff1, "<No Name>", 9);
|
||||
} else {
|
||||
for (int i = 0; i < 12; i++) {
|
||||
if (G_gpg_vstate.ux_buff1[i] == '<') {
|
||||
|
Loading…
Reference in New Issue
Block a user