summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1999-11-17 09:23:55 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1999-11-17 09:23:55 +0000
commit4297f90fd8f2aad2c4e3dbdcacdebadc7df7a0f0 (patch)
tree7252bc657513e5644b76a7d4d6d8c99d51921694 /sys
parent51b4f2655ebab74aaf8e83f2639d206b9963c21b (diff)
Avoid overflowing when calculating blocks at the third level of indirection.
From NetBSD.
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ufs/ufs_bmap.c5
1 files changed, 3 insertions, 2 deletions
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)