From fce090e8ee3a87af7de95711de9395ba6a814a82 Mon Sep 17 00:00:00 2001 From: fsu Date: Mon, 4 Mar 2019 11:19:21 +0000 Subject: [PATCH] Fix integer overflow possibility. Reported by: Christopher Krah Reported as: FS-2-EXT2-1: Out-of-Bounds Write in nmount (ext2_vget) Reviewed by: pfg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19326 --- sys/fs/ext2fs/ext2_vfsops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index 861f95b86438..a363a5641aed 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -1163,8 +1163,8 @@ ext2_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp) struct buf *bp; struct vnode *vp; struct thread *td; - int i, error; - int used_blocks; + unsigned int i, used_blocks; + int error; td = curthread; error = vfs_hash_get(mp, ino, flags, td, vpp, NULL, NULL);