summaryrefslogtreecommitdiffstats
path: root/src/hci
diff options
context:
space:
mode:
authorMichael Brown2017-03-22 15:35:29 +0100
committerMichael Brown2017-03-22 15:35:29 +0100
commitf032556b15f13a7884d3fc0ccc4d54c2a390d4e9 (patch)
tree57a8aa9a0f6ddf43f050f0c826ad8ad7cb1b3936 /src/hci
parent[sis190] Avoid NULL pointer dereference (diff)
downloadipxe-f032556b15f13a7884d3fc0ccc4d54c2a390d4e9.tar.gz
ipxe-f032556b15f13a7884d3fc0ccc4d54c2a390d4e9.tar.xz
ipxe-f032556b15f13a7884d3fc0ccc4d54c2a390d4e9.zip
[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 b900c068..169e0120 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;