Squashfs: fix corruption check in get_dir_index_using_name()
authorPhillip Lougher <phillip@squashfs.org.uk>
Tue, 3 Sep 2013 03:02:53 +0000 (04:02 +0100)
committerMohamad Ayyash <mkayyash@google.com>
Wed, 4 Mar 2015 19:20:43 +0000 (11:20 -0800)
commitedd2496ccf4a46cfb4c2d20ff9b93ab29b055e1b
treecc40fa06dedebe0fe129b34b0748458ffe33ef3e
parent706a7943a802fedc861d39598a4399999209e341
Squashfs: fix corruption check in get_dir_index_using_name()

Patch "Squashfs: sanity check information from disk" from
Dan Carpenter adds a missing check for corruption in the
"size" field while reading the directory index from disk.

It, however, sets err to -EINVAL, this value is not used later, and
so setting it is completely redundant.  So remove it.

Errors in reading the index are deliberately non-fatal.  If we
get an error in reading the index we just return the part of the
index we have managed to read - the index isn't essential,
just quicker.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
fs/squashfs/namei.c