From: Darrick J. Wong Date: Tue, 26 May 2020 18:36:03 +0000 (-0400) Subject: xfs_db: fix rdbmap_boundscheck X-Git-Tag: xfsprogs-5.7-fixes_2020-06-25~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb9bedb6d97b4e9dcc81ec19bc402de3ae2d9020;p=thirdparty%2Fxfsprogs-dev.git xfs_db: fix rdbmap_boundscheck 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 Reviewed-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- diff --git a/db/check.c b/db/check.c index c6fce605b..12c03b6d0 100644 --- a/db/check.c +++ b/db/check.c @@ -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