Browse Source

[mucurses] Ensure SLK labels are always terminated

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 years ago
parent
commit
f032556b15
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/hci/mucurses/slk.c

+ 1
- 1
src/hci/mucurses/slk.c View File

359
 		return ERR;
359
 		return ERR;
360
 
360
 
361
 	strncpy(slks->fkeys[labnum].label, label,
361
 	strncpy(slks->fkeys[labnum].label, label,
362
-		sizeof(slks->fkeys[labnum].label));
362
+		(sizeof(slks->fkeys[labnum].label) - 1));
363
 	slks->fkeys[labnum].fmt = fmt;
363
 	slks->fkeys[labnum].fmt = fmt;
364
 
364
 
365
 	return OK;
365
 	return OK;

Loading…
Cancel
Save