]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: treat zero da btree pointers as corruption
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 23 May 2018 21:30:48 +0000 (16:30 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 23 May 2018 21:30:48 +0000 (16:30 -0500)
commit67a79e2cc9320aaf269cd00e9c8d16892931886d
treea9de2747ad799e2b88ab673996f22a75dd6f9598
parentd2be29d4df5560d5f179a930a403f2a459178afb
xfs_repair: treat zero da btree pointers as corruption

If a da btree pointer is zero (i.e. the beginning of the fork) report
this as a corrupt tree to the caller instead of telling it that
everything is good.  Fixes assertion errors when fuzzing
nbtree[0].before to zero in xfs/394.

[sandeen: tweak comment above change for clarity]

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/dir2.c