diff options
author | lulf <lulf@FreeBSD.org> | 2009-02-09 21:34:06 +0000 |
---|---|---|
committer | lulf <lulf@FreeBSD.org> | 2009-02-09 21:34:06 +0000 |
commit | 1d90e269afc22a6d75affcfa622f167d4c18c03a (patch) | |
tree | 7b187ab49415306d51583214d401f086a551e3ed /lib/libdisk/open_disk.c | |
parent | 48ea2cb2ca9b5c828fc829924277900c2a269471 (diff) | |
download | FreeBSD-src-1d90e269afc22a6d75affcfa622f167d4c18c03a.zip FreeBSD-src-1d90e269afc22a6d75affcfa622f167d4c18c03a.tar.gz |
- 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
Diffstat (limited to 'lib/libdisk/open_disk.c')
-rw-r--r-- | lib/libdisk/open_disk.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libdisk/open_disk.c b/lib/libdisk/open_disk.c index 6ffe88d..6cc9acb 100644 --- a/lib/libdisk/open_disk.c +++ b/lib/libdisk/open_disk.c @@ -127,6 +127,9 @@ Int_Open_Disk(const char *name, char *conftxt) 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. |