Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5cb... Commit: 5cb72e7ab6105f78af396a7e68d19ddaf3d06289 Parent: 04ed614339bb64003f3cc42af9994ff637313618 Author: Bob Peterson rpeterso@redhat.com AuthorDate: Thu Feb 3 12:18:49 2011 -0600 Committer: Bob Peterson rpeterso@redhat.com CommitterDate: Thu Feb 3 12:18:49 2011 -0600
gfs2_edit: fix segfault in set_bitmap when block is in rgrp
If you called libgfs2 function gfs2_set_bitmap to set a bit but specified a block outside the data blocks, it would segfault.
rhbz#674843 --- gfs2/libgfs2/fs_bits.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gfs2/libgfs2/fs_bits.c b/gfs2/libgfs2/fs_bits.c index 7409bed..38ef92c 100644 --- a/gfs2/libgfs2/fs_bits.c +++ b/gfs2/libgfs2/fs_bits.c @@ -168,7 +168,7 @@ int gfs2_set_bitmap(struct gfs2_sbd *sdp, uint64_t blkno, int state)
rgd = gfs2_blk2rgrpd(sdp, blkno);
- if(!rgd) + if(!rgd || blkno < rgd->ri.ri_data0) return -1;
rgrp_block = (uint32_t)(blkno - rgd->ri.ri_data0);
cluster-commits@lists.fedorahosted.org