Re: [evolution-patches] fix for bug #72325



committed

On Thu, 2005-03-31 at 15:15 -0500, Jeffrey Stedfast wrote:
> http://bugzilla.ximian.com/show_bug.cgi?id=72325
> 
> crashed in finalise... perhaps because challenge or response were NULL
> 
> text/plain attachment (72325.patch), ""
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/gnome/evolution-data-server/camel/ChangeLog,v
> retrieving revision 1.2441
> diff -u -r1.2441 ChangeLog
> --- ChangeLog	25 Mar 2005 18:17:16 -0000	1.2441
> +++ ChangeLog	31 Mar 2005 20:17:55 -0000
> @@ -1,3 +1,10 @@
> +2005-03-31  Jeffrey Stedfast  <fejj novell com>
> +
> +	* camel-sasl-digest-md5.c (camel_sasl_digest_md5_finalize): If the
> +	SASL negotiation fails or is cancelled, then the challenge and/or
> +	response may be NULL and so dereferencing them will cause a
> +	crash. Possible fix for bug #72325.
> +
>  2005-03-25  Jeffrey Stedfast  <fejj novell com>
>  
>  	* camel-mime-utils.c (header_append_param): Don't try to convert
> Index: camel-sasl-digest-md5.c
> ===================================================================
> RCS file: /cvs/gnome/evolution-data-server/camel/camel-sasl-digest-md5.c,v
> retrieving revision 1.24
> diff -u -r1.24 camel-sasl-digest-md5.c
> --- camel-sasl-digest-md5.c	2 Dec 2004 08:03:30 -0000	1.24
> +++ camel-sasl-digest-md5.c	31 Mar 2005 20:17:55 -0000
> @@ -197,35 +197,40 @@
>  	GList *p;
>  	int i;
>  	
> -	for (i = 0; i < c->realms->len; i++)
> -		g_free (c->realms->pdata[i]);
> -	g_ptr_array_free (c->realms, TRUE);
> -	g_free (c->nonce);
> -	g_free (c->charset);
> -	g_free (c->algorithm);
> -	for (p = c->params; p; p = p->next) {
> -		struct _param *param = p->data;
> +	if (c != NULL) {
> +		for (i = 0; i < c->realms->len; i++)
> +			g_free (c->realms->pdata[i]);
> +		g_ptr_array_free (c->realms, TRUE);
>  		
> -		g_free (param->name);
> -		g_free (param->value);
> -		g_free (param);
> +		g_free (c->nonce);
> +		g_free (c->charset);
> +		g_free (c->algorithm);
> +		for (p = c->params; p; p = p->next) {
> +			struct _param *param = p->data;
> +			
> +			g_free (param->name);
> +			g_free (param->value);
> +			g_free (param);
> +		}
> +		g_list_free (c->params);
> +		g_free (c);
>  	}
> -	g_list_free (c->params);
> -	g_free (c);
>  	
> -	g_free (r->username);
> -	g_free (r->realm);
> -	g_free (r->nonce);
> -	g_free (r->cnonce);
> -	if (r->uri) {
> -		g_free (r->uri->type);
> -		g_free (r->uri->host);
> +	if (r != NULL) {
> +		g_free (r->username);
> +		g_free (r->realm);
> +		g_free (r->nonce);
> +		g_free (r->cnonce);
> +		if (r->uri) {
> +			g_free (r->uri->type);
> +			g_free (r->uri->host);
>  		g_free (r->uri->name);
> +		}
> +		g_free (r->charset);
> +		g_free (r->authzid);
> +		g_free (r->param);
> +		g_free (r);
>  	}
> -	g_free (r->charset);
> -	g_free (r->authzid);
> -	g_free (r->param);
> -	g_free (r);
>  	
>  	g_free (sasl->priv);
>  }




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]