xfs: fix integer overflow in xrep_bmap
PATCH 1/1 xfs: fix integer overflow in xrep_bmap
From: Darrick J. Wong <[email protected]>
The variable declaration in this function predates the merge of the nrext64 (aka 64-bit extent counters) feature, which means that the variable declaration type is insufficient to avoid an integer overflow. Fix that by redeclaring the variable to be xfs_extnum_t.
Coverity-id: 1630958
--- fs/xfs/scrub/bmap_repair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/scrub/bmap_repair.c +1 -1
@@ -801,7 +801,7 @@ xrep_bmap( {struct xrep_bmap *rb;char *descr; -unsigned int max_bmbt_recs; +xfs_extnum_t max_bmbt_recs;bool large_extcount;int error =0 ;
Quoted 6 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
The variable declaration in this function predates the merge of the nrext64 (aka 64-bit extent counters) feature, which means that the variable declaration type is insufficient to avoid an integer overflow. Fix that by redeclaring the variable to be
xfs_extnum_t.
Looks good:
Quoted 6 lines · Darrick J. Wong
The variable declaration in this function predates the merge of the nrext64 (aka 64-bit extent counters) feature, which means that the variable declaration type is insufficient to avoid an integer overflow. Fix that by redeclaring the variable to be
xfs_extnum_t.
Applied to for-next, thanks!
[1/1] xfs: fix integer overflow in xrep_bmap
commit: 0fb823f1cf3417e06846d1ffe2c97e10a65a847e
Best regards,
Signature · 1 line
Carlos Maiolino <[email protected]>