mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-03 12:35:02 +00:00
Fixed overflow in 1K-blocks to disk-blocks conversions. Use quad
arithmetic instead of the special macros in PR 8163 or the magic 2's in PR 381. (Rev.1.3 unfortunately fixed only half of the problems reported in PR 381.) PR: 381, 8163
This commit is contained in:
parent
b55dcca107
commit
4e7767c7b9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42231
@ -45,7 +45,7 @@ static const char copyright[] =
|
|||||||
static char sccsid[] = "@(#)edquota.c 8.1 (Berkeley) 6/6/93";
|
static char sccsid[] = "@(#)edquota.c 8.1 (Berkeley) 6/6/93";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id$";
|
"$Id: edquota.c,v 1.7 1997/09/17 06:29:23 charnier Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -469,9 +469,11 @@ readprivs(quplist, inname)
|
|||||||
warnx("%s:%s: bad format", fsp, cp);
|
warnx("%s:%s: bad format", fsp, cp);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
dqblk.dqb_curblocks = btodb(dqblk.dqb_curblocks * 1024);
|
dqblk.dqb_curblocks = btodb((off_t)dqblk.dqb_curblocks * 1024);
|
||||||
dqblk.dqb_bsoftlimit = btodb(dqblk.dqb_bsoftlimit * 1024);
|
dqblk.dqb_bsoftlimit = btodb((off_t)dqblk.dqb_bsoftlimit
|
||||||
dqblk.dqb_bhardlimit = btodb(dqblk.dqb_bhardlimit * 1024);
|
* 1024);
|
||||||
|
dqblk.dqb_bhardlimit = btodb((off_t)dqblk.dqb_bhardlimit
|
||||||
|
* 1024);
|
||||||
if ((cp = strtok(line2, "\n")) == NULL) {
|
if ((cp = strtok(line2, "\n")) == NULL) {
|
||||||
warnx("%s: %s: bad format", fsp, line2);
|
warnx("%s: %s: bad format", fsp, line2);
|
||||||
return (0);
|
return (0);
|
||||||
|
Loading…
Reference in New Issue
Block a user