diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-06-25 16:11:43 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-06-25 16:11:43 +0000 |
commit | 0186925673c9672a93b058dbc33c54935cdce2a9 (patch) | |
tree | 866fc2a5aa4d9f1f2062205a9e5e02cb7c1f9a59 /sys | |
parent | 713d1216211bc2991459c2cc795b8f1fe629a865 (diff) |
use daddr64_t for size in bounds_check_with_label(); prompted by miod@;
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/subr_disk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index b37fe065ff2..e8bf114dd88 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.61 2007/06/20 18:15:47 deraadt Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.62 2007/06/25 16:11:42 otto Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -606,7 +606,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel) { #define blockpersec(count, lp) ((count) * (((lp)->d_secsize) / DEV_BSIZE)) struct partition *p = lp->d_partitions + DISKPART(bp->b_dev); - int sz = howmany(bp->b_bcount, DEV_BSIZE); + daddr64_t sz = howmany(bp->b_bcount, DEV_BSIZE); /* avoid division by zero */ if (lp->d_secpercyl == 0) |