commit | cf4e06d665e53ec7a5af67c9104e7278777a8488 | [log] [tgz] |
---|---|---|
author | Theodore Ts'o <tytso@mit.edu> | Thu Jan 22 16:01:38 2009 -0500 |
committer | Theodore Ts'o <tytso@mit.edu> | Thu Jan 22 16:01:38 2009 -0500 |
tree | e127a69e80d0defc3fd8c4492a5930d6c309a9a2 | |
parent | a93d40696073076b26bc11052f7cc99588d74dae [diff] |
libext2fs: Add sanity checks to ext2fs_{block,inode}_alloc_stats If ext2fs_inode_alloc_stats2() or ext2fs_block_alloc_stats() is passed an insanely large inode or block number, it's possible for these functions to overrun an array boundary and cause the calling program to crash with a memory error. Detect this case, and since these functions don't return an error code, print a warning message, much like we do in ext2fs_warn_bitmap2(). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>