]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_db: check for valid inode data pointer before dereferencing
authorDave Chinner <dchinner@redhat.com>
Thu, 8 Jul 2010 00:20:22 +0000 (10:20 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 8 Jul 2010 00:20:22 +0000 (10:20 +1000)
commit527d1f4265ec357909fa494181e4aefae7be0b37
treeda656b8db953898f95d3b0f9b0f72a3b41fa1cca
parent9e95c34e0ecaa573c5ea8b447e798b11d109e9cd
xfs_db: check for valid inode data pointer before dereferencing

When processing an inode, the code checks various flags to determine
whether to output messages or not. When checking the CLI provided
inode numbers to be verbose about, we fail to check if the inode
data structre returned is valid or not before dereferencing it.
Hence running xfs_check with the "serious errors only" flag, xfs_db
will crash. Fix up the "should we output" logic to be safe.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
db/check.c