Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Assert that the label data is valid before ...
details: https://anonhg.NetBSD.org/src/rev/2c0b8016ad49
branches: trunk
changeset: 457438:2c0b8016ad49
user: martin <martin%NetBSD.org@localhost>
date: Tue Jun 25 07:14:45 2019 +0000
description:
Assert that the label data is valid before invoking disklabel(8)
diffstat:
usr.sbin/sysinst/disklabel.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r 19a825e4f823 -r 2c0b8016ad49 usr.sbin/sysinst/disklabel.c
--- a/usr.sbin/sysinst/disklabel.c Tue Jun 25 05:04:35 2019 +0000
+++ b/usr.sbin/sysinst/disklabel.c Tue Jun 25 07:14:45 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.c,v 1.4 2019/06/20 18:32:32 martin Exp $ */
+/* $NetBSD: disklabel.c,v 1.5 2019/06/25 07:14:45 martin Exp $ */
/*
* Copyright 2018 The NetBSD Foundation, Inc.
@@ -272,6 +272,8 @@
char *d;
size_t n;
+ assert(parts->l.d_secsize != 0);
+
sprintf(fname, "/tmp/disklabel.%u", getpid());
f = fopen(fname, "w");
if (f == NULL)
Home |
Main Index |
Thread Index |
Old Index