svn commit: r309179 - head/sys/fs/ext2fs

Pedro F. Giffuni pfg at FreeBSD.org
Sat Nov 26 02:06:34 UTC 2016


Author: pfg
Date: Sat Nov 26 02:06:33 2016
New Revision: 309179
URL: https://svnweb.freebsd.org/changeset/base/309179

Log:
  ext2: avoid possible overflow when calculating malloc size.
  
  This is inspired on r308064 for case of reloading UFS.
  
  MFC after:	1 week

Modified:
  head/sys/fs/ext2fs/ext2_vfsops.c

Modified: head/sys/fs/ext2fs/ext2_vfsops.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_vfsops.c	Sat Nov 26 01:17:03 2016	(r309178)
+++ head/sys/fs/ext2fs/ext2_vfsops.c	Sat Nov 26 02:06:33 2016	(r309179)
@@ -537,7 +537,8 @@ ext2_mountfs(struct vnode *devvp, struct
 	struct csum *sump;
 	int error;
 	int ronly;
-	int i, size;
+	int i;
+	u_long size;
 	int32_t *lp;
 	int32_t e2fs_maxcontig;
 


More information about the svn-src-head mailing list