Fix an integer overflow that causes fsck_ffs to crash when it
encounters very large file sizes in the filesystem. Reviewed by: mckusick
This commit is contained in:
parent
614440e53d
commit
5b8bc2e87b
@ -276,7 +276,7 @@ checkinode(ino_t inumber, struct inodesc *idesc)
|
||||
}
|
||||
}
|
||||
}
|
||||
for (j = ndb; j < NDADDR; j++)
|
||||
for (j = ndb; ndb < NDADDR && j < NDADDR; j++)
|
||||
if (DIP(dp, di_db[j]) != 0) {
|
||||
if (debug)
|
||||
printf("bad direct addr[%d]: %qu\n", j,
|
||||
|
Loading…
x
Reference in New Issue
Block a user