commit | a046da5963649663933cf16d54ca2a892cc1a560 | [log] [tgz] |
---|---|---|
author | Nickolai Zeldovich <nickolai@csail.mit.edu> | Tue Jan 08 15:45:31 2013 -0500 |
committer | Theodore Ts'o <tytso@mit.edu> | Tue Jan 08 20:42:26 2013 -0500 |
tree | 763f0f4fbe1a9db3b025c37c801a3d9701c86d49 | |
parent | 6dd83548f4193f8bfd7983240471db0d0c7af626 [diff] |
e2fsck: avoid memory corruption on ext2fs_open2 failure In try_open_fs(), if ext2fs_open2() returns an error, do not try to access the struct ext2_filesys. The previous check 'if (ret_fs)' was always true, but even 'if (*ret_fs)' might be incorrect in some cases, so check 'retval==0' instead. Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>