svn commit: r298725 - stable/10/sys/fs/ext2fs
Pedro F. Giffuni
pfg at FreeBSD.org
Thu Apr 28 01:05:42 UTC 2016
Author: pfg
Date: Thu Apr 28 01:05:40 2016
New Revision: 298725
URL: https://svnweb.freebsd.org/changeset/base/298725
Log:
MFC r298518:
ext2_htree_release(): prevent signed integer overflow in a loop.
h_levels_num, as most data structs in ext2fs, is unsigned so
the index that addresses it has to be unsigned as well.
To get to overflow here we would probably be considering a
degenerate case though.
MFC after: 5 days
Modified:
stable/10/sys/fs/ext2fs/ext2_htree.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/fs/ext2fs/ext2_htree.c
==============================================================================
--- stable/10/sys/fs/ext2fs/ext2_htree.c Wed Apr 27 23:04:42 2016 (r298724)
+++ stable/10/sys/fs/ext2fs/ext2_htree.c Thu Apr 28 01:05:40 2016 (r298725)
@@ -191,7 +191,7 @@ ext2_htree_set_limit(struct ext2fs_htree
static void
ext2_htree_release(struct ext2fs_htree_lookup_info *info)
{
- int i;
+ u_int i;
for (i = 0; i < info->h_levels_num; i++) {
struct buf *bp = info->h_levels[i].h_bp;
More information about the svn-src-stable-10
mailing list