Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/dump Avoid byte overflow in block estimate for large files
details: https://anonhg.NetBSD.org/src/rev/2b8acfa09665
branches: trunk
changeset: 472722:2b8acfa09665
user: sommerfe <sommerfe%NetBSD.org@localhost>
date: Wed May 05 16:53:46 1999 +0000
description:
Avoid byte overflow in block estimate for large files
diffstat:
sbin/dump/traverse.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 28df32d09e12 -r 2b8acfa09665 sbin/dump/traverse.c
--- a/sbin/dump/traverse.c Wed May 05 16:04:58 1999 +0000
+++ b/sbin/dump/traverse.c Wed May 05 16:53:46 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: traverse.c,v 1.24 1999/03/23 14:22:59 bouyer Exp $ */
+/* $NetBSD: traverse.c,v 1.25 1999/05/05 16:53:46 sommerfe Exp $ */
/*-
* Copyright (c) 1980, 1988, 1991, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)traverse.c 8.7 (Berkeley) 6/15/95";
#else
-__RCSID("$NetBSD: traverse.c,v 1.24 1999/03/23 14:22:59 bouyer Exp $");
+__RCSID("$NetBSD: traverse.c,v 1.25 1999/05/05 16:53:46 sommerfe Exp $");
#endif
#endif /* not lint */
@@ -113,7 +113,7 @@
* dump blocks (sizeest vs. blkest in the indirect block
* calculation).
*/
- blkest = howmany(dbtob(dp->di_blocks), TP_BSIZE);
+ blkest = howmany(dbtob((u_int64_t)dp->di_blocks), TP_BSIZE);
sizeest = howmany(dp->di_size, TP_BSIZE);
if (blkest > sizeest)
blkest = sizeest;
Home |
Main Index |
Thread Index |
Old Index