Fix an int overflow on very large file systems.
PR: bin/113399 Submitted by: Staffan Ulfberg <staffan@ulfberg.se>
This commit is contained in:
parent
228d1e266e
commit
baa15be0ea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174706
@ -259,8 +259,8 @@ growfs(int fsi, int fso, unsigned int Nflag)
|
|||||||
*/
|
*/
|
||||||
for (cylno = osblock.fs_ncg; cylno < sblock.fs_ncg; cylno++) {
|
for (cylno = osblock.fs_ncg; cylno < sblock.fs_ncg; cylno++) {
|
||||||
initcg(cylno, utime, fso, Nflag);
|
initcg(cylno, utime, fso, Nflag);
|
||||||
j = sprintf(tmpbuf, " %d%s",
|
j = sprintf(tmpbuf, " %jd%s",
|
||||||
(int)fsbtodb(&sblock, cgsblock(&sblock, cylno)),
|
(intmax_t)fsbtodb(&sblock, cgsblock(&sblock, cylno)),
|
||||||
cylno < (sblock.fs_ncg-1) ? "," : "" );
|
cylno < (sblock.fs_ncg-1) ? "," : "" );
|
||||||
if (i + j >= width) {
|
if (i + j >= width) {
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user