Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Nov 2016 02:06:33 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r309179 - head/sys/fs/ext2fs
Message-ID:  <201611260206.uAQ26XYK040855@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611260206.uAQ26XYK040855>