Sfoglia il codice sorgente

[iscsi] Fix printing of non-existent strings in iBFT debug messages

tags/v1.0.0-rc1
Michael Brown 15 anni fa
parent
commit
d000c6b8c7
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2
    1
      src/arch/i386/interface/pcbios/ibft.c

+ 2
- 1
src/arch/i386/interface/pcbios/ibft.c Vedi File

@@ -236,7 +236,8 @@ static int ibft_set_string_option ( struct ibft_string_block *strings,
236 236
  */
237 237
 static const char * ibft_string ( struct ibft_string_block *strings,
238 238
 				  struct ibft_string *string ) {
239
-	return ( ( ( char * ) strings->table ) + string->offset );
239
+	return ( string->offset ?
240
+		 ( ( ( char * ) strings->table ) + string->offset ) : NULL );
240 241
 }
241 242
 
242 243
 /**

Loading…
Annulla
Salva