Whamcloud - gitweb
libext2fs: ensure validate_entry doesn't read beyond blocksize
authorNic Case <number9652@yahoo.com>
Mon, 29 Jun 2009 05:24:40 +0000 (01:24 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 29 Jun 2009 05:24:40 +0000 (01:24 -0400)
commit6a8da46d284721e95f893d4f229a2bec473797e1
treecebad15e934503f88cc5135638de7ec5c64cfc38
parentdad0bab204a61c1749e1bbc747f8fa86fa0f1577
libext2fs: ensure validate_entry doesn't read beyond blocksize

ext2fs_validate_entry would read beyond the end of the block to get
dirent->rec_len for certain arguments (like if blocksize ==
final_offset).  This patch adds a check so that doesn't happen, and
changes the types of the arguments to avoid a compiler warning.

Signed-off-by: Nic Case <number9652@yahoo.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/dir_iterate.c