svn commit: r188408 - head/lib/libdisk

Ulf Lilleengen lulf at FreeBSD.org
Mon Feb 9 13:34:09 PST 2009


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.


More information about the svn-src-head mailing list