Whamcloud - gitweb
libext2fs: in ext2fs_open[2](), return an error if s_desc_size is too large
authorTheodore Ts'o <tytso@mit.edu>
Tue, 9 Aug 2022 00:17:40 +0000 (20:17 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 9 Aug 2022 00:17:40 +0000 (20:17 -0400)
commit42c11edd0863e093a2cb84c56720af0e9b8e8c68
tree1395ab69b7947161b5018d90e7f859483882e84e
parent54445dc254dec30649dad8e1bb2c7a9990137a36
libext2fs: in ext2fs_open[2](), return an error if s_desc_size is too large

Previously, ext2fs_open() and ext2fs_open2() would return an error if
s_desc_size is too small.  Add a check so it will return an error if
s_desc_size is too large, as well.

These checks will be skipped for e2fsck when it uses the flag
EXT2_FLAG_IGNORE_SB_ERRORS.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/unix.c
lib/ext2fs/openfs.c
tests/f_desc_size_bad/expect.1