Browse Source

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

tags/v1.0.0-rc1
Michael Brown 15 years ago
parent
commit
d000c6b8c7
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/arch/i386/interface/pcbios/ibft.c

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

236
  */
236
  */
237
 static const char * ibft_string ( struct ibft_string_block *strings,
237
 static const char * ibft_string ( struct ibft_string_block *strings,
238
 				  struct ibft_string *string ) {
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…
Cancel
Save