Squashfs: add corruption check for type in squashfs_readdir()
authorPhillip Lougher <phillip@squashfs.org.uk>
Wed, 4 Sep 2013 01:58:12 +0000 (02:58 +0100)
committerMohamad Ayyash <mkayyash@google.com>
Wed, 4 Mar 2015 19:21:48 +0000 (11:21 -0800)
commitbb5919cc205072075aab3639a9c62302db148d25
tree5399fc0bc81b23fc64dbd84180f6e622ef81f2d7
parent4fed250b48dc5033a0fcada7aa2ca77f507c7ddc
Squashfs: add corruption check for type in squashfs_readdir()

We read the type field from disk.  This value should be sanity
checked for correctness to avoid an out of bounds access when
reading the squashfs_filetype_table array.

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