diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-09-16 14:56:13 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2006-09-16 14:56:13 +0000 |
commit | 5eb18275d5f599528c5f4b8e4f00a190668d1070 (patch) | |
tree | b51db191094845101bda34df20f30e1a97328161 /sys/arch/aviion | |
parent | 323127da28857fb031b3953bca7dbec13cb816ea (diff) |
Revert new check for DOS partitions running past d_secperunit (e.g.
r1.54 of i386/disksubr.c). The check incorrectly handled extended
partitions. Possibly a symptom of a deeper problem with extended
partition offsets that will be addressed post-4.0.
Problem reported/fix tested by A. Velichinsky, cause diagnosed by
otto@.
ok pedro@ mickey@ miod@ deraadt@
Diffstat (limited to 'sys/arch/aviion')
-rw-r--r-- | sys/arch/aviion/aviion/disksubr.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/arch/aviion/aviion/disksubr.c b/sys/arch/aviion/aviion/disksubr.c index f9ae4a097a4..3a3c4eb2e51 100644 --- a/sys/arch/aviion/aviion/disksubr.c +++ b/sys/arch/aviion/aviion/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.5 2006/08/20 03:14:21 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.6 2006/09/16 14:56:11 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -162,13 +162,10 @@ donot: */ for (dp2=dp, i=0; i < NDOSPART && n < 8; i++, dp2++) { struct partition *pp = &lp->d_partitions[8+n]; - u_int64_t blkno = (u_int64_t)part_blkno + - (u_int64_t)letoh32(dp2->dp_start) + - (u_int64_t)letoh32(dp2->dp_size); if (dp2->dp_typ == DOSPTYP_OPENBSD) continue; - if (blkno > lp->d_secperunit) + if (letoh32(dp2->dp_size) > lp->d_secperunit) continue; if (letoh32(dp2->dp_size)) pp->p_size = letoh32(dp2->dp_size); |