commit | dd4f565d5ac3b1f37100291fb1cd067dd0d55d05 | [log] [tgz] |
---|---|---|
author | Theodore Ts'o <tytso@mit.edu> | Mon Jan 14 19:29:54 2013 -0500 |
committer | Theodore Ts'o <tytso@mit.edu> | Tue Jan 15 14:08:18 2013 -0500 |
tree | db6eef9d4716cb26c7fbf324de396c0d3a6afd6c | |
parent | 86a985e74987b08090ecbacf3d02c8d80594c809 [diff] |
libext2fs: avoid 32-bit overflow in ext2fs_initialize with a 512M cluster size If the user attemps to create a 512MB cluster, we need to adjust the defaults to avoid a 32-bit overflow of s_blocks_per_group. Also check to make sure that the caller of ext2fs_initialize() has not given a value of s_clusters_per_group that would result in an overflow of s_blocks_per_group. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>