• Theodore Ts'o's avatar
    libext2fs: Add sanity checks to ext2fs_{block,inode}_alloc_stats · cf4e06d6
    Theodore Ts'o authored
    
    
    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: default avatar"Theodore Ts'o" <tytso@mit.edu>
    cf4e06d6
alloc_stats.c 2.73 KB