This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
commit 1fcfbf36b1563f692d4a12a53f959fb21b42e32c
Author: Andrew Price <anprice(a)redhat.com>
Date: Tue Mar 6 11:31:44 2018 +0000
fsck.gfs2: Avoid int overflow in find_next_rgrp_dist
Spotted by coverity: "Potentially overflowing expression 2048 *
mega_in_blocks with type int (32 bits, signed) is evaluated using 32-bit
arithmetic, and then used in a context that expects an expression of
type uint64_t"
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/fsck/rgrepair.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gfs2/fsck/rgrepair.c b/gfs2/fsck/rgrepair.c
index e64f70d..e45a649 100644
--- a/gfs2/fsck/rgrepair.c
+++ b/gfs2/fsck/rgrepair.c
@@ -324,7 +324,8 @@ static uint64_t find_next_rgrp_dist(struct gfs2_sbd *sdp, uint64_t
blk,
struct rgrp_tree *rgd = NULL, *next_rgd;
struct gfs2_buffer_head *bh;
struct gfs2_meta_header mh;
- int first, length, b, found, mega_in_blocks;
+ int first, length, b, found;
+ uint64_t mega_in_blocks;
uint32_t free_blocks;
for (n = osi_first(&sdp->rgtree); n; n = next) {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date