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/hppa64 | |
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/hppa64')
-rw-r--r-- | sys/arch/hppa64/hppa64/disksubr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/hppa64/hppa64/disksubr.c b/sys/arch/hppa64/hppa64/disksubr.c index 4f933fd0387..78d2fee78c8 100644 --- a/sys/arch/hppa64/hppa64/disksubr.c +++ b/sys/arch/hppa64/hppa64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.27 2006/10/28 23:26:05 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.28 2007/02/03 18:22:33 krw Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -306,6 +306,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)) |