On Fri, Jan 25, 2013 at 04:12:38PM +0100, Michal Židek wrote:
Bug found by coverity.
https://fedorahosted.org/sssd/ticket/1790
Patch is attached.
Thanks
Michal
sorry, there are missing braces:
- DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero() failed.\n");
+ DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_zero() failed.\n"));
Although it is right that the original cause is that talloc_zero()
failed in be_req_create() I think it is better to say "be_req_create()
failed." here, because implementation of be_req_create() might change.
bye,
Sumit
From 82917f237013b96e630a8093728e869141f6c68f Mon Sep 17 00:00:00
2001
From: Michal Zidek <mzidek(a)redhat.com>
Date: Fri, 25 Jan 2013 15:49:29 +0100
Subject: [PATCH] Possible null derefence in ipa_subdomains.c.
Found by coverity.
https://fedorahosted.org/sssd/ticket/1790
---
src/providers/ipa/ipa_subdomains.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c
index c9ab3aa..fe48ddf 100644
--- a/src/providers/ipa/ipa_subdomains.c
+++ b/src/providers/ipa/ipa_subdomains.c
@@ -930,6 +930,10 @@ static void ipa_subdom_online_cb(void *pvt)
be_req = be_req_create(ctx, NULL, ctx->be_ctx,
ipa_subdom_be_req_callback, NULL);
+ if (be_req == NULL) {
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero() failed.\n");
+ return;
+ }
ipa_subdomains_retrieve(ctx, be_req);
--
1.7.11.2
_______________________________________________
sssd-devel mailing list
sssd-devel(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel