Whamcloud - gitweb
LU-8465 ext2fs: fix to avoid invalid memory access
Dir block might be corrupted and cause the next dirent is out
of block size boundary, even though we have the check to avoid
problem, memory check tools like valgrind still complains it.
Patch try to fix the problem by checking if offset exceed max
offset firstly before getting the pointer.
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I40c4587bb35b7f22d47f37b4ffa52ef822f11b41
Reviewed-on: https://review.whamcloud.com/39850
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>