From fe523aa1077fac93859c1948ce800b7cda8c82c1 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 14 Dec 1998 21:17:37 +0000 Subject: [PATCH] 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 --- sys/kern/vfs_bio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 8310305f90c..753fae081a0 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) {