瀏覽代碼

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

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 年之前
父節點
當前提交
501fa53b25
共有 1 個檔案被更改,包括 1 行新增0 行删除
  1. 1
    0
      src/hci/mucurses/slk.c

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

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

Loading…
取消
儲存