Bläddra i källkod

[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 år sedan
förälder
incheckning
501fa53b25
1 ändrade filer med 1 tillägg och 0 borttagningar
  1. 1
    0
      src/hci/mucurses/slk.c

+ 1
- 0
src/hci/mucurses/slk.c Visa fil

@@ -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] ) {

Laddar…
Avbryt
Spara