Whamcloud - gitweb
libext2fs: sanity check group argument to ext2fs_clear_{block,inode}_uninit()
authorTheodore Ts'o <tytso@mit.edu>
Thu, 12 May 2016 03:23:06 +0000 (23:23 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 12 May 2016 03:23:06 +0000 (23:23 -0400)
commit3888c1e84dfe8a3d9a63f53c1f4c6ed56c391f17
tree128f900f0d75824e274f7cdcf9a41aa247140add
parentd0e855fa478a7bb522861d96bfc733df6456d536
libext2fs: sanity check group argument to ext2fs_clear_{block,inode}_uninit()

Avoid a potential out-of-bounds memory access if the group passed to
ext2fs_clear_block_uninit() or ext2fs_clear_inode_uninit() is greater
than the number of groups in the file system.  This prevents a failure
in resize2fs when to allocate a block when growing the file system
significantly.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/alloc.c