diff options
author | Michael Brown | 2017-03-22 15:35:29 +0100 |
---|---|---|
committer | Michael Brown | 2017-03-22 15:35:29 +0100 |
commit | f032556b15f13a7884d3fc0ccc4d54c2a390d4e9 (patch) | |
tree | 57a8aa9a0f6ddf43f050f0c826ad8ad7cb1b3936 /src/hci/mucurses | |
parent | [sis190] Avoid NULL pointer dereference (diff) | |
download | ipxe-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/mucurses')
-rw-r--r-- | src/hci/mucurses/slk.c | 2 |
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; |