This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master in repository gfs2-utils.
commit 53ddc29cc4ff538030de044ffb3b548d19f21e5a Author: Andrew Price anprice@redhat.com AuthorDate: Thu Nov 25 16:03:09 2021 +0000
gfs2_edit: Fix NULL check in print_block_type()
'type' is dereferenced in both cases of the if statement so check it separately.
Signed-off-by: Andrew Price anprice@redhat.com --- gfs2/edit/hexedit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index 88ee3e5f..e3794290 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -1592,7 +1592,9 @@ static void jump(void)
static void print_block_type(uint64_t tblock, const struct lgfs2_metadata *type) { - if (type != NULL && type->nfields > 0) + if (type == NULL) + return; + if (type->nfields > 0) printf("%d (Block %"PRIu64" is type %d: %s)\n", type->mh_type, tblock, type->mh_type, type->display); else
cluster-commits@lists.fedorahosted.org