[SSSD] [PATCHES] AD provider: fix use after free & uninitialized variable

Sumit Bose sbose at redhat.com
Mon Apr 28 09:00:59 UTC 2014


On Mon, Apr 28, 2014 at 10:07:55AM +0200, Pavel Reichl wrote:
> Hello,
> 
> while working on #2332 I found these 2 bugs. Unfortunately they weren't
> the cause of problem, but bugs anyway.
> 
> Please see attached patches.
> 
> Pavel Reichl

> From 111cf406d01e228f9097aa4bff6d8ceac1992db6 Mon Sep 17 00:00:00 2001
> From: Pavel Reichl <preichl at redhat.com>
> Date: Fri, 25 Apr 2014 13:26:19 +0100
> Subject: [PATCH] AD Provider: bug-fix uninitialized variable
> 
> Resolves:
> https://fedorahosted.org/sssd/ticket/2332
> ---
>  src/providers/ad/ad_subdomains.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/providers/ad/ad_subdomains.c b/src/providers/ad/ad_subdomains.c
> index abcc93cfae60e8a81d2075c3c275597f79a514e6..7c6848d935983d480407cbdf5051bd663036ef64 100644
> --- a/src/providers/ad/ad_subdomains.c
> +++ b/src/providers/ad/ad_subdomains.c
> @@ -664,7 +664,7 @@ static void ad_subdomains_get_root_domain_done(struct tevent_req *req)
>      struct sysdb_attrs **reply = NULL;
>      struct ad_subdomains_req_ctx *ctx;
>      int dp_error = DP_ERR_FATAL;
> -    bool has_changes;
> +    bool has_changes = false;

As an addition or an alternative I would like to suggest to fix
ad_subdomains_refresh() as well so that the last argument is always set
if EOK is returned.

bye,
Sumit

>  
>      ctx = tevent_req_callback_data(req, struct ad_subdomains_req_ctx);
>  
> -- 
> 1.8.4.2
> 



More information about the sssd-devel mailing list