浏览代码

[mucurses] Attempt to fix use of uninitialised buffer with strcat()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 年前
父节点
当前提交
501fa53b25
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1
    0
      src/hci/mucurses/slk.c

+ 1
- 0
src/hci/mucurses/slk.c 查看文件

@@ -81,6 +81,7 @@ static void _print_label ( struct _softlabel sl ) {
81 81
 
82 82
 	assert ( slks->max_label_len <= SLK_MAX_LABEL_LEN );
83 83
 	space_ch = ' ';
84
+	memset ( str, 0, sizeof ( str ) );
84 85
 
85 86
 	// protect against gaps in the soft label keys array
86 87
 	if ( ! sl.label[0] ) {

正在加载...
取消
保存