diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-02-03 18:22:34 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-02-03 18:22:34 +0000 |
commit | 97f91a4d238d41f4e093ac5e9cd3d43354e9f057 (patch) | |
tree | c1c0620b6767f9b9d38e51e225cc92cc32c4c8e2 /sys/arch/landisk | |
parent | b6725843a3729f2335d4c8aae26c6686f06de48a (diff) |
Don't spoof an msdosfs partition if it claims to start after the end
of the disk. Fixes the creation of spurious 'i' partitions on new iPod
Shuffle. And other devices with no MBR, just a FAT32 filesystem.
Pointed out most recently by Stephan A. Rickauer for his sixth
generation, clip-on iPod shuffle.
Fix tested by Stephan.
ok pedro@ tom@ miod@ 'nice' deraadt@
Diffstat (limited to 'sys/arch/landisk')
-rw-r--r-- | sys/arch/landisk/landisk/disksubr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/landisk/landisk/disksubr.c b/sys/arch/landisk/landisk/disksubr.c index 9ea6931b274..a3251e2d058 100644 --- a/sys/arch/landisk/landisk/disksubr.c +++ b/sys/arch/landisk/landisk/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.12 2006/10/29 00:02:35 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.13 2007/02/03 18:22:33 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -166,6 +166,8 @@ donot: continue; if (letoh32(dp2->dp_size) > lp->d_secperunit) continue; + if (letoh32(dp2->dp_start) > lp->d_secperunit) + continue; if (letoh32(dp2->dp_size) == 0) continue; if (letoh32(dp2->dp_start)) |