Fix potentially overflowing expression "fs->fs_ipg * fs->fs_ncg"
by casting fs->fs_ipg to (ino_t). CID: 1388258
This commit is contained in:
parent
621cbb9437
commit
6986f98fc2
@ -60,7 +60,7 @@ getino(struct uufsd *disk, void **dino, ino_t inode, int *mode)
|
||||
ERROR(disk, NULL);
|
||||
|
||||
fs = &disk->d_fs;
|
||||
if (inode >= fs->fs_ipg * fs->fs_ncg) {
|
||||
if (inode >= (ino_t)fs->fs_ipg * fs->fs_ncg) {
|
||||
ERROR(disk, "inode number out of range");
|
||||
return (-1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user