summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsturm <sturm@openbsd.org>2006-07-19 15:48:06 +0000
committersturm <sturm@openbsd.org>2006-07-19 15:48:06 +0000
commit0afbe6d9cecfb3c90cf3b81dee2b6bfbcb926d1e (patch)
treee746f8bc3b257c0662ccce96cadfc55d0ca361e7
parentAdd a couple of files missing from the cleanup list (diff)
downloadwireguard-openbsd-0afbe6d9cecfb3c90cf3b81dee2b6bfbcb926d1e.tar.xz
wireguard-openbsd-0afbe6d9cecfb3c90cf3b81dee2b6bfbcb926d1e.zip
from FreeBSD:
Don't reject FAT file systems with a number of "Heads" greater than 255; USB keychains exist that use 256 as the number of heads. This check has also been removed in Darwin (along with most of the other head/sector sanity checks). this fixes pr 4988, ok pedro
-rw-r--r--sys/msdosfs/msdosfs_vfsops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c
index 1af07051b51..1bf90685d14 100644
--- a/sys/msdosfs/msdosfs_vfsops.c
+++ b/sys/msdosfs/msdosfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vfsops.c,v 1.36 2005/03/02 00:46:10 tom Exp $ */
+/* $OpenBSD: msdosfs_vfsops.c,v 1.37 2006/07/19 15:48:06 sturm Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */
/*-
@@ -356,8 +356,8 @@ msdosfs_mountfs(devvp, mp, p, argp)
if (!(argp->flags & MSDOSFSMNT_GEMDOSFS)) {
/* XXX - We should probably check more values here */
- if (!pmp->pm_BytesPerSec || !SecPerClust
- || pmp->pm_Heads > 255 || pmp->pm_SecPerTrack > 63) {
+ if (!pmp->pm_BytesPerSec || !SecPerClust || !pmp->pm_Heads
+ || pmp->pm_SecPerTrack > 63) {
error = EFTYPE;
goto error_exit;
}