summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2022-08-08 20:17:40 -0400
committerTheodore Ts'o <tytso@mit.edu>2022-08-08 20:17:40 -0400
commit42c11edd0863e093a2cb84c56720af0e9b8e8c68 (patch)
tree1395ab69b7947161b5018d90e7f859483882e84e /tests
parent54445dc254dec30649dad8e1bb2c7a9990137a36 (diff)
downloade2fsprogs-42c11edd0863e093a2cb84c56720af0e9b8e8c68.tar.gz
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/f_desc_size_bad/expect.12
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/f_desc_size_bad/expect.1 b/tests/f_desc_size_bad/expect.1
index 122a5774..84b852a4 100644
--- a/tests/f_desc_size_bad/expect.1
+++ b/tests/f_desc_size_bad/expect.1
@@ -1,3 +1,5 @@
+../e2fsck/e2fsck: Block group descriptor size incorrect while trying to open test.img
+../e2fsck/e2fsck: Trying to load superblock despite errors...
ext2fs_check_desc: Block group descriptor size incorrect
../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks...
Pass 1: Checking inodes, blocks, and sizes