diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2001-06-20 23:12:49 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2001-06-20 23:12:49 +0000 |
commit | d56eede64774d87e208c1a59f08b1e556c8d5202 (patch) | |
tree | 99a0a80442d621e4b12f4e9e3cda3228af8b4c62 /sbin | |
parent | 27c717b0a6a2a13a264dad1b0baaf206ad729c63 (diff) |
circumvent a 32-bit integer arithmetic overflow
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/savecore/savecore.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index 1d4bbbee677..cd7abc3ab9c 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -1,4 +1,4 @@ -/* $OpenBSD: savecore.c,v 1.24 2001/06/04 14:59:49 mickey Exp $ */ +/* $OpenBSD: savecore.c,v 1.25 2001/06/20 23:12:48 niklas Exp $ */ /* $NetBSD: savecore.c,v 1.26 1996/03/18 21:16:05 leo Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)savecore.c 8.3 (Berkeley) 1/2/94"; #else -static char rcsid[] = "$OpenBSD: savecore.c,v 1.24 2001/06/04 14:59:49 mickey Exp $"; +static char rcsid[] = "$OpenBSD: savecore.c,v 1.25 2001/06/20 23:12:48 niklas Exp $"; #endif #endif /* not lint */ @@ -620,7 +620,7 @@ check_space() syslog(LOG_ERR, "%s: %m", dirn); exit(1); } - spacefree = (fsbuf.f_bavail * fsbuf.f_bsize) / 1024; + spacefree = ((off_t)fsbuf.f_bavail * fsbuf.f_bsize) / 1024; (void)snprintf(path, sizeof(path), "%s/minfree", dirn); if ((fp = fopen(path, "r")) == NULL) |