mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 18:56:38 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=332415
|
@ -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 a new issue