浏览代码

[comboot] Do not assume that image has a non-NULL command line

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 年前
父节点
当前提交
d1ad046a87
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      src/arch/i386/image/com32.c

+ 3
- 3
src/arch/i386/image/com32.c 查看文件

@@ -119,7 +119,8 @@ static int com32_exec_loop ( struct image *image ) {
119 119
 			/* %2 */ "r" ( get_fbms() * 1024 - (COM32_BOUNCE_SEG << 4) ),
120 120
 			/* %3 */ "i" ( COM32_BOUNCE_SEG << 4 ),
121 121
 			/* %4 */ "r" ( virt_to_phys ( com32_intcall_wrapper ) ),
122
-			/* %5 */ "r" ( virt_to_phys ( image->cmdline ) ),
122
+			/* %5 */ "r" ( virt_to_phys ( image->cmdline ?
123
+						      image->cmdline : "" ) ),
123 124
 			/* %6 */ "r" ( COM32_START_PHYS )
124 125
 		:
125 126
 			"memory" );
@@ -291,8 +292,7 @@ static int com32_prepare_bounce_buffer ( struct image * image ) {
291 292
 static int com32_probe ( struct image *image ) {
292 293
 	int rc;
293 294
 
294
-	DBGC ( image, "COM32 %p: name '%s', cmdline '%s'\n",
295
-	       image, image->name, image->cmdline );
295
+	DBGC ( image, "COM32 %p: name '%s'\n", image, image->name );
296 296
 
297 297
 	/* Check if this is a COMBOOT image */
298 298
 	if ( ( rc = com32_identify ( image ) ) != 0 ) {

正在加载...
取消
保存