]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - repair/phase6.c
repair: fix segv on directory block read failure
authorDave Chinner <dchinner@redhat.com>
Wed, 4 Sep 2013 22:05:58 +0000 (22:05 +0000)
committerRich Johnston <rjohnston@sgi.com>
Mon, 16 Sep 2013 20:16:51 +0000 (15:16 -0500)
commitb5fa9e86b131de04aa0aaa0f5710cb633873a872
tree45eb23ce5f6102af97e4f9c25bea60d01985d441
parent546abaa44dd31be31f8cc8c6664d065239d20e22
repair: fix segv on directory block read failure

We try to read all blocks in the directory, but if we have a block
form directory we only have one block and so we need to fail if
there is a read error. Otherwise we try to derefence a null buffer
pointer.

While fixing the error handling for a read failure, fix the bug that
caused the read failure - trying to verify a block format buffer
with the data format buffer verifier.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
repair/phase6.c