From fae279d84788eb16fd58b37c90e4ace9552bc696 Mon Sep 17 00:00:00 2001 From: Paul Traina Date: Sat, 10 May 1997 17:11:24 +0000 Subject: Fix null dereference if config variable not set. --- usr.sbin/sysinstall/disks.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin/sysinstall/disks.c') 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" -- cgit v1.2.3