aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall/disks.c
diff options
context:
space:
mode:
authorPaul Traina <pst@FreeBSD.org>1997-05-10 17:11:24 +0000
committerPaul Traina <pst@FreeBSD.org>1997-05-10 17:11:24 +0000
commitfae279d84788eb16fd58b37c90e4ace9552bc696 (patch)
tree4eb58d041eedc330eb23366ad939ce3124ccaedb /usr.sbin/sysinstall/disks.c
parent0160dedc65d5fdd8ef1ccaad50d1f819b6141a78 (diff)
downloadsrc-fae279d84788eb16fd58b37c90e4ace9552bc696.tar.gz
src-fae279d84788eb16fd58b37c90e4ace9552bc696.zip
Fix null dereference if config variable not set.
Notes
Notes: svn path=/head/; revision=25665
Diffstat (limited to 'usr.sbin/sysinstall/disks.c')
-rw-r--r--usr.sbin/sysinstall/disks.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c
index b2d78edf6952..34a0c1db9b57 100644
--- a/usr.sbin/sysinstall/disks.c
+++ b/usr.sbin/sysinstall/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.83 1997/04/20 16:46:27 jkh Exp $
+ * $Id: disks.c,v 1.84 1997/05/05 05:16:00 pst Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -248,13 +248,13 @@ diskPartition(Device *dev, Disk *d)
case 'A':
cp = variable_get(VAR_DEDICATE_DISK);
- if (!strcasecmp(cp, "always"))
+ if (cp && !strcasecmp(cp, "always"))
rv = 1;
else {
rv = msgYesNo("Do you want to do this with a true partition entry\n"
"so as to remain cooperative with any future possible\n"
"operating systems on the drive(s)?");
- if (rv != 0 && strcasecmp(cp, "nowarn")) {
+ if (rv != 0 && (!cp || strcasecmp(cp, "nowarn"))) {
rv = !msgYesNo("This is dangerous in that it will make the drive totally\n"
"uncooperative with other potential operating systems on the\n"
"same disk. It will lead instead to a totally dedicated disk,\n"