From effd84c09085712933cb0a2fa113b4c61f674fd1 Mon Sep 17 00:00:00 2001 From: pfg Date: Sat, 3 Dec 2016 00:43:11 +0000 Subject: MFC r309179: ext2fs: avoid possible overflow when calculating malloc size. This is inspired on r308064 for the case of mounting UFS. --- sys/fs/ext2fs/ext2_vfsops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index 2083fb6..aaedb30 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -537,7 +537,8 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp) struct csum *sump; int error; int ronly; - int i, size; + int i; + u_long size; int32_t *lp; int32_t e2fs_maxcontig; -- cgit v1.1