Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jan 2011 21:56:14 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r217483 - user/nwhitehorn/bsdinstall/partedit
Message-ID:  <201101162156.p0GLuEEP078337@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Sun Jan 16 21:56:14 2011
New Revision: 217483
URL: http://svn.freebsd.org/changeset/base/217483

Log:
  Fix a possible crash when choosing to partition a totally blank disk in the
  partitioning wizard.
  
  Reported by:	Marius Nuennerich <marius at nuenneri dot ch>

Modified:
  user/nwhitehorn/bsdinstall/partedit/part_wizard.c

Modified: user/nwhitehorn/bsdinstall/partedit/part_wizard.c
==============================================================================
--- user/nwhitehorn/bsdinstall/partedit/part_wizard.c	Sun Jan 16 20:40:50 2011	(r217482)
+++ user/nwhitehorn/bsdinstall/partedit/part_wizard.c	Sun Jan 16 21:56:14 2011	(r217483)
@@ -149,7 +149,7 @@ wizard_partition(struct gmesh *mesh, con
 	struct ggeom *gpart = NULL;
 	struct gconfig *gc;
 	char message[512];
-	const char *scheme;
+	const char *scheme = NULL;
 	char *retval = NULL;
 	int choice;
 
@@ -188,7 +188,7 @@ query:
 	dialog_vars.no_label = NULL;
 	dialog_vars.defaultno = FALSE;
 
-	if (choice == 0) { /* Entire disk */
+	if (scheme == NULL || choice == 0) { /* Entire disk */
 		if (gpart != NULL) { /* Erase partitioned disk */
 			choice = dialog_yesno("Confirmation", "This will erase "
 			   "the disk. Are you sure you want to proceed?", 0, 0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101162156.p0GLuEEP078337>