[SSSD] [PATCH] Possible null derefence in ipa_subdomains.c.
Michal Židek
mzidek at redhat.com
Fri Jan 25 16:38:25 UTC 2013
On 01/25/2013 04:52 PM, Sumit Bose wrote:
> 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"));
>
This was fixed in the patch I sent recently :-)
> 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.
>
You are right. I used the message because we use it on other places were
be_req_create() is called. Attached patch uses the message you proposed.
Thanks
Michal
> bye,
> Sumit
>
>> From 82917f237013b96e630a8093728e869141f6c68f Mon Sep 17 00:00:00 2001
>> From: Michal Zidek <mzidek at 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
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Possible-null-derefence-in-ipa_subdomains.c.patch
Type: text/x-patch
Size: 915 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130125/4775b0df/attachment.bin>
More information about the sssd-devel
mailing list