summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorlulf <lulf@FreeBSD.org>2009-02-09 21:34:06 +0000
committerlulf <lulf@FreeBSD.org>2009-02-09 21:34:06 +0000
commit1d90e269afc22a6d75affcfa622f167d4c18c03a (patch)
tree7b187ab49415306d51583214d401f086a551e3ed /lib
parent48ea2cb2ca9b5c828fc829924277900c2a269471 (diff)
downloadFreeBSD-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')
-rw-r--r--lib/libdisk/open_disk.c3
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.
OpenPOWER on IntegriCloud