From 4297f90fd8f2aad2c4e3dbdcacdebadc7df7a0f0 Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Wed, 17 Nov 1999 09:23:55 +0000 Subject: Avoid overflowing when calculating blocks at the third level of indirection. From NetBSD. --- sys/ufs/ufs/ufs_bmap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c index aec6963580d..ef23d838fff 100644 --- a/sys/ufs/ufs/ufs_bmap.c +++ b/sys/ufs/ufs/ufs_bmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_bmap.c,v 1.6 1999/11/17 09:19:10 art Exp $ */ +/* $OpenBSD: ufs_bmap.c,v 1.7 1999/11/17 09:23:54 art Exp $ */ /* $NetBSD: ufs_bmap.c,v 1.3 1996/02/09 22:36:00 christos Exp $ */ /* @@ -234,7 +234,8 @@ ufs_getlbns(vp, bn, ap, nump) { long metalbn, realbn; struct ufsmount *ump; - int blockcnt, i, numlevels, off; + int64_t blockcnt; + int i, numlevels, off; ump = VFSTOUFS(vp->v_mount); if (nump) -- cgit v1.2.3