Module Name: src
Committed By: simonb
Date: Tue Dec 28 00:37:16 UTC 2021
Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c
Log Message:
In biosdisk_findpartition() check if part_name isn't NULL before
assigning *part_name.
Thanks to manu@ for the pointer.
To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/i386/stand/lib/biosdisk.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/lib/biosdisk.c
diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.56 src/sys/arch/i386/stand/lib/biosdisk.c:1.57
--- src/sys/arch/i386/stand/lib/biosdisk.c:1.56 Tue Dec 28 00:34:30 2021
+++ src/sys/arch/i386/stand/lib/biosdisk.c Tue Dec 28 00:37:16 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: biosdisk.c,v 1.56 2021/12/28 00:34:30 simonb Exp $ */
+/* $NetBSD: biosdisk.c,v 1.57 2021/12/28 00:37:16 simonb Exp $ */
/*
* Copyright (c) 1996, 1998
@@ -1028,7 +1028,8 @@ biosdisk_findpartition(int biosdev, dadd
{
#if defined(NO_DISKLABEL) && defined(NO_GPT)
*partition = 0;
- *part_name = NULL;
+ if (part_name)
+ *part_name = NULL;
return 0;
#else
int i;
@@ -1047,7 +1048,8 @@ biosdisk_findpartition(int biosdev, dadd
/* default to first partition */
*partition = 0;
- *part_name = NULL;
+ if (part_name)
+ *part_name = NULL;
/* Look for netbsd partition that is the dos boot one */
d = alloc_biosdisk(biosdev);