aboutsummaryrefslogtreecommitdiffstats
path: root/src/hci
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2017-03-22 16:35:29 +0200
committerMichael Brown <mcb30@ipxe.org>2017-03-22 16:35:29 +0200
commitf032556b15f13a7884d3fc0ccc4d54c2a390d4e9 (patch)
tree57a8aa9a0f6ddf43f050f0c826ad8ad7cb1b3936 /src/hci
parent3870a7bde2aea95f2ec8e730b853166eb469f2c2 (diff)
downloadipxe-f032556b15f13a7884d3fc0ccc4d54c2a390d4e9.tar.gz
[mucurses] Ensure SLK labels are always terminated
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci')
-rw-r--r--src/hci/mucurses/slk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hci/mucurses/slk.c b/src/hci/mucurses/slk.c
index b900c068a..169e0120b 100644
--- a/src/hci/mucurses/slk.c
+++ b/src/hci/mucurses/slk.c
@@ -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;