From 2ac5fed1ea4e9f56a18d0cc3b445855cdc6757c2 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Wed, 12 Mar 2014 17:38:22 +0100 Subject: [PATCH 112/113] AD: Continue if sssd failes to check extra members Reported by scan-build for (mi = 0; group_only[mi]; mi++) { ^~~~~~~~~~ warning: Array access (from variable 'group_only') results in a null pointer dereference It can happend if function ad_group_extra_members fails (ret != EOK) Reviewed-by: Simo Sorce (cherry picked from commit bad65473c4c28ecbf2b6bd374a7ae2d634d57d8d) --- src/providers/ad/ad_id.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/providers/ad/ad_id.c b/src/providers/ad/ad_id.c index a35823b4b77d42fc583a61653a175f0ee4d22ac4..01d18d7ae4bee82d8b75c7103c0f07635c6e08cc 100644 --- a/src/providers/ad/ad_id.c +++ b/src/providers/ad/ad_id.c @@ -772,6 +772,7 @@ ad_enum_cross_dom_members(struct sdap_options *opts, ret = ad_group_extra_members(tmp_ctx, msgs[i], dom, &group_only); if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, ("Failed to check extra members\n")); + continue; } else if (group_only == NULL) { DEBUG(SSSDBG_TRACE_INTERNAL, ("No extra members\n")); continue; -- 1.8.5.3