Module Name:    src
Committed By:   manu
Date:           Thu Nov 18 16:18:13 UTC 2021

Modified Files:
        src/sys/arch/i386/stand/efiboot: devopen.c

Log Message:
Fix crash because of NULL pointer reference


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/i386/stand/efiboot/devopen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/stand/efiboot/devopen.c
diff -u src/sys/arch/i386/stand/efiboot/devopen.c:1.11 src/sys/arch/i386/stand/efiboot/devopen.c:1.12
--- src/sys/arch/i386/stand/efiboot/devopen.c:1.11	Sat Jan 18 19:25:58 2020
+++ src/sys/arch/i386/stand/efiboot/devopen.c	Thu Nov 18 16:18:13 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: devopen.c,v 1.11 2020/01/18 19:25:58 nonaka Exp $	 */
+/*	$NetBSD: devopen.c,v 1.12 2021/11/18 16:18:13 manu Exp $	 */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -288,8 +288,9 @@ neterr:
 	 * biosdisk
 	 */
 	if (strcmp(devname, "esp") == 0) {
+		const char *part_name = NULL;
 		bios2dev(boot_biosdev, boot_biossector, &devname, &unit,
-		    &partition, NULL);
+		    &partition, &part_name);
 		if (efidisk_get_efi_system_partition(boot_biosdev, &partition))
 			return ENXIO;
 	}

Reply via email to