Selaa lähdekoodia

[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 vuotta sitten
vanhempi
commit
501fa53b25
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1
    0
      src/hci/mucurses/slk.c

+ 1
- 0
src/hci/mucurses/slk.c Näytä tiedosto

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…
Peruuta
Tallenna