Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/repquota Fix int overflow for large quota, PR bin/1...
details: https://anonhg.NetBSD.org/src/rev/1b1fbf65f41d
branches: trunk
changeset: 507145:1b1fbf65f41d
user: bouyer <bouyer%NetBSD.org@localhost>
date: Wed Mar 14 19:34:37 2001 +0000
description:
Fix int overflow for large quota, PR bin/12383 from mori%tri.asanuma.co.jp@localhost
diffstat:
usr.sbin/repquota/repquota.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (25 lines):
diff -r 274f0f9b0f27 -r 1b1fbf65f41d usr.sbin/repquota/repquota.c
--- a/usr.sbin/repquota/repquota.c Wed Mar 14 18:01:22 2001 +0000
+++ b/usr.sbin/repquota/repquota.c Wed Mar 14 19:34:37 2001 +0000
@@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "@(#)repquota.c 8.2 (Berkeley) 11/22/94";
#else
-__RCSID("$NetBSD: repquota.c,v 1.17 2000/04/14 06:26:54 simonb Exp $");
+__RCSID("$NetBSD: repquota.c,v 1.18 2001/03/14 19:34:37 bouyer Exp $");
#endif
#endif /* not lint */
@@ -236,9 +236,9 @@
fup->fu_dqblk.dqb_isoftlimit &&
fup->fu_dqblk.dqb_curinodes >=
fup->fu_dqblk.dqb_isoftlimit ? '+' : '-',
- dbtob(fup->fu_dqblk.dqb_curblocks) / 1024,
- dbtob(fup->fu_dqblk.dqb_bsoftlimit) / 1024,
- dbtob(fup->fu_dqblk.dqb_bhardlimit) / 1024,
+ (int)(dbtob((u_quad_t)fup->fu_dqblk.dqb_curblocks) / 1024),
+ (int)(dbtob((u_quad_t)fup->fu_dqblk.dqb_bsoftlimit) / 1024),
+ (int)(dbtob((u_quad_t)fup->fu_dqblk.dqb_bhardlimit) / 1024),
fup->fu_dqblk.dqb_bsoftlimit &&
fup->fu_dqblk.dqb_curblocks >=
fup->fu_dqblk.dqb_bsoftlimit ?
Home |
Main Index |
Thread Index |
Old Index