From: Michael Brown Date: Wed, 22 Mar 2017 14:35:29 +0000 (+0200) Subject: [mucurses] Ensure SLK labels are always terminated X-Git-Tag: v1.20.1~253 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f032556b15f13a7884d3fc0ccc4d54c2a390d4e9;p=thirdparty%2Fipxe.git [mucurses] Ensure SLK labels are always terminated Signed-off-by: Michael Brown --- 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;