]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: fix rdbmap_boundscheck
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 26 May 2020 18:36:03 +0000 (14:36 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 26 May 2020 18:36:03 +0000 (14:36 -0400)
This predicate should check the a rt block number against number of
rtblocks, not the number of AG blocks.  Ooops.

Fixes: 7161cd21b3ed ("xfs_db: bounds-check access to the dbmap array")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/check.c

index c6fce605b297b73e226e3ad420f7e9f6bb5f2dc8..12c03b6d017277513324b49a2e2651dfd9236c03 100644 (file)
@@ -1490,7 +1490,7 @@ static inline bool
 rdbmap_boundscheck(
        xfs_rfsblock_t  bno)
 {
-       return bno < mp->m_sb.sb_agblocks;
+       return bno < mp->m_sb.sb_rblocks;
 }
 
 static void