Skip to content

Commit

Permalink
[mucurses] Ensure SLK labels are always terminated
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Mar 22, 2017
1 parent 3870a7b commit f032556
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hci/mucurses/slk.c
Expand Up @@ -359,7 +359,7 @@ int slk_set ( int labnum, const char *label, int fmt ) {
return ERR;

strncpy(slks->fkeys[labnum].label, label,
sizeof(slks->fkeys[labnum].label));
(sizeof(slks->fkeys[labnum].label) - 1));
slks->fkeys[labnum].fmt = fmt;

return OK;
Expand Down

0 comments on commit f032556

Please sign in to comment.