Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/stand/lib In biosdisk_findpartition() check if...
details: https://anonhg.NetBSD.org/src/rev/61676984523b
branches: trunk
changeset: 1029225:61676984523b
user: simonb <simonb%NetBSD.org@localhost>
date: Tue Dec 28 00:37:16 2021 +0000
description:
In biosdisk_findpartition() check if part_name isn't NULL before
assigning *part_name.
Thanks to manu@ for the pointer.
diffstat:
sys/arch/i386/stand/lib/biosdisk.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 56abb53f86e8 -r 61676984523b sys/arch/i386/stand/lib/biosdisk.c
--- a/sys/arch/i386/stand/lib/biosdisk.c Tue Dec 28 00:34:30 2021 +0000
+++ b/sys/arch/i386/stand/lib/biosdisk.c Tue Dec 28 00:37:16 2021 +0000
@@ -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 @@
{
#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 @@
/* 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);
Home |
Main Index |
Thread Index |
Old Index