From owner-svn-src-all@FreeBSD.ORG Mon Feb 9 21:34:06 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4B9910656DE; Mon, 9 Feb 2009 21:34:06 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91D748FC0A; Mon, 9 Feb 2009 21:34:06 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n19LY6u6071753; Mon, 9 Feb 2009 21:34:06 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n19LY6Lw071752; Mon, 9 Feb 2009 21:34:06 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200902092134.n19LY6Lw071752@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 9 Feb 2009 21:34:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188408 - head/lib/libdisk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2009 21:34:09 -0000 Author: lulf Date: Mon Feb 9 21:34:06 2009 New Revision: 188408 URL: http://svn.freebsd.org/changeset/base/188408 Log: - Sanitize disk parameters retrieved from GEOM, as they are not guaranteed to have sane values. It caused sysinstall to crash when installing on certain SD cards. Discussed with: marcel Modified: head/lib/libdisk/open_disk.c Modified: head/lib/libdisk/open_disk.c ============================================================================== --- head/lib/libdisk/open_disk.c Mon Feb 9 20:50:23 2009 (r188407) +++ head/lib/libdisk/open_disk.c Mon Feb 9 21:34:06 2009 (r188408) @@ -127,6 +127,9 @@ Int_Open_Disk(const char *name, char *co name, a, b, line); } + /* Sanitize the parameters. */ + Sanitize_Bios_Geom(d); + /* * Calculate the number of cylinders this disk must have. If we have * an obvious insanity, we set the number of cylinders to zero.