read_fs: check the root inode block is found in scan_inode_table()

Further hardening of read_fs.  If the filesystem is corrupted we may
get the situation where in the inode_table metatadata block scan we
fail to find the metadata block containing the root inode.  In this
case *root_inode_block will be used unitialised.

Add code to check against the small possibility this happens.  In the
majority of cases if the filesystem is corrupted we will fail to read
a metadata block in the block scan, and so we will never get to this
place in the code, however, it could happen and so it needs to be
guarded against.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
1 file changed
tree: 4fa949017fa25da67d99c0dc7724e3fd0fa107b3
  1. kernel/
  2. kernel-2.4/
  3. squashfs-tools/
  4. README