diff options
author | pfg <pfg@FreeBSD.org> | 2016-12-03 00:43:11 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-12-03 00:43:11 +0000 |
commit | effd84c09085712933cb0a2fa113b4c61f674fd1 (patch) | |
tree | f7d90c359e31917aa4c58bb6b47ce4640869ce4e | |
parent | df416754a3e6215c02350fdfddce78e01d3ab7c4 (diff) | |
download | FreeBSD-src-effd84c09085712933cb0a2fa113b4c61f674fd1.zip FreeBSD-src-effd84c09085712933cb0a2fa113b4c61f674fd1.tar.gz |
MFC r309179:
ext2fs: avoid possible overflow when calculating malloc size.
This is inspired on r308064 for the case of mounting UFS.
-rw-r--r-- | sys/fs/ext2fs/ext2_vfsops.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |