From owner-svn-src-user@FreeBSD.ORG Sun Jan 16 21:56:14 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 742D1106566C; Sun, 16 Jan 2011 21:56:14 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 638AF8FC12; Sun, 16 Jan 2011 21:56:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0GLuEmL078339; Sun, 16 Jan 2011 21:56:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0GLuEEP078337; Sun, 16 Jan 2011 21:56:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201101162156.p0GLuEEP078337@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 16 Jan 2011 21:56:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217483 - user/nwhitehorn/bsdinstall/partedit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jan 2011 21:56:14 -0000 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 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);