浏览代码

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

tags/v1.0.0-rc1
Michael Brown 14 年前
父节点
当前提交
d000c6b8c7
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      src/arch/i386/interface/pcbios/ibft.c

+ 2
- 1
src/arch/i386/interface/pcbios/ibft.c 查看文件

@@ -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
 /**

正在加载...
取消
保存