mirror of https://github.com/ipxe/ipxe.git
[mucurses] Ensure SLK labels are always terminated
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/58/merge
parent
3870a7bde2
commit
f032556b15
|
@ -359,7 +359,7 @@ int slk_set ( int labnum, const char *label, int fmt ) {
|
||||||
return ERR;
|
return ERR;
|
||||||
|
|
||||||
strncpy(slks->fkeys[labnum].label, label,
|
strncpy(slks->fkeys[labnum].label, label,
|
||||||
sizeof(slks->fkeys[labnum].label));
|
(sizeof(slks->fkeys[labnum].label) - 1));
|
||||||
slks->fkeys[labnum].fmt = fmt;
|
slks->fkeys[labnum].fmt = fmt;
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
|
Loading…
Reference in New Issue