summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1998-12-14 21:17:37 +0000
committerdillon <dillon@FreeBSD.org>1998-12-14 21:17:37 +0000
commitf93fd492201685714c409b437e01edd8b64ae87d (patch)
tree636c90c053f836ffaa2a02706372451291414fc4 /sys/kern
parentf4d6fc7ea681e07bea8ddb7c39518d67e09b5d78 (diff)
downloadFreeBSD-src-f93fd492201685714c409b437e01edd8b64ae87d.zip
FreeBSD-src-f93fd492201685714c409b437e01edd8b64ae87d.tar.gz
fix intermediate overflow in 'quad = int * int' situation by casting
the arguments to the multiply to a quad equivalent. In this case, vm_ooffset_t. Reviewed by: Archie Cobbs <archie@whistle.com>
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_bio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 8310305..753fae0 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -11,7 +11,7 @@
* 2. Absolutely no warranty of function or purpose is made by the author
* John S. Dyson.
*
- * $Id: vfs_bio.c,v 1.185 1998/11/18 09:00:47 dg Exp $
+ * $Id: vfs_bio.c,v 1.186 1998/12/07 17:23:45 eivind Exp $
*/
/*
@@ -1288,7 +1288,7 @@ inmem(struct vnode * vp, daddr_t blkno)
tinc = PAGE_SIZE;
if (tinc > vp->v_mount->mnt_stat.f_iosize)
tinc = vp->v_mount->mnt_stat.f_iosize;
- off = blkno * vp->v_mount->mnt_stat.f_iosize;
+ off = (vm_ooffset_t)blkno * (vm_ooffset_t)vp->v_mount->mnt_stat.f_iosize;
for (toff = 0; toff < vp->v_mount->mnt_stat.f_iosize; toff += tinc) {
OpenPOWER on IntegriCloud