Squashfs: add corruption check for type in squashfs_readdir()
commit9e012423869e1efbae3762b87ceab509027231c9
authorPhillip Lougher <phillip@squashfs.org.uk>
Wed, 4 Sep 2013 01:58:12 +0000 (4 02:58 +0100)
committerPhillip Lougher <phillip@squashfs.org.uk>
Fri, 6 Sep 2013 03:57:54 +0000 (6 04:57 +0100)
treedd451cda9f1a82f6ea83c645807bb459c51b4bf8
parentf960cae5357d8e52b8af91e8b1621cae565dffb3
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