svn commit: r217483 - user/nwhitehorn/bsdinstall/partedit
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sun Jan 16 21:56:14 UTC 2011
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);
More information about the svn-src-user
mailing list