Re: [evolution-patches] Patch for bug #51924,Mailer related for 1.4 branch
- From: Jeffrey Stedfast <fejj ximian com>
- To: Antonio Xu <antonio xu sun com>
- Cc: evolution-patches ximian com
- Subject: Re: [evolution-patches] Patch for bug #51924,Mailer related for 1.4 branch
- Date: Tue, 09 Dec 2003 09:52:48 -0500
your patch still unref's a NULL pointer.
if ((charenc = (CamelMimeFilter *) camel_mime_filter_charset_new_convert
(charset, "utf-8"))) {
camel_stream_filter_add (filtered_stream, charenc);
camel_object_unref (charenc);
}
however, this should not need to be done. how is the user's charset
setting NULL? I think you need to figure that out first.
Jeff
On Tue, 2003-12-09 at 04:57, Antonio Xu wrote:
> Hello all,
>
> I have created a patch for bug #51924. In this patch, I add a judgement
> to avoid adding null filter into filtered stream, that will solve the
> crash issue. We should judge whether the filter is a valid pointer
> before add it into filtered stream. Because we couldn't create the
> filter on SuSe, if the specific charset was NULL. My patch is apply to
> evolution 14 branch. Please review it.
>
> Regards,
>
> Anto
>
> ______________________________________________________________________
> Index: mail/mail-config.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/mail/mail-config.c,v
> retrieving revision 1.284.2.2
> diff -u -r1.284.2.2 mail-config.c
> --- mail/mail-config.c 1 Dec 2003 22:42:13 -0000 1.284.2.2
> +++ mail/mail-config.c 9 Dec 2003 07:40:39 -0000
> @@ -1604,7 +1604,8 @@
>
> charset = gconf_client_get_string (config->gconf, "/apps/evolution/mail/composer/charset", NULL);
> charenc = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "utf-8");
> - camel_stream_filter_add (filtered_stream, charenc);
> + if (charenc)
> + camel_stream_filter_add (filtered_stream, charenc);
> camel_object_unref (charenc);
> g_free (charset);
>
> Index: composer/e-msg-composer.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
> retrieving revision 1.395.2.8
> diff -u -r1.395.2.8 e-msg-composer.c
> --- composer/e-msg-composer.c 6 Oct 2003 17:07:16 -0000 1.395.2.8
> +++ composer/e-msg-composer.c 9 Dec 2003 07:40:56 -0000
> @@ -867,7 +867,8 @@
>
> charset = composer ? composer->charset : composer_get_default_charset_setting ();
> charenc = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "utf-8");
> - camel_stream_filter_add (filtered_stream, charenc);
> + if (charenc)
> + camel_stream_filter_add (filtered_stream, charenc);
> camel_object_unref (charenc);
>
> camel_stream_write_to_stream ((CamelStream *) filtered_stream, (CamelStream *) memstream);
> Index: composer/ChangeLog
> ===================================================================
> RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
> retrieving revision 1.544.2.16
> diff -u -r1.544.2.16 ChangeLog
> --- composer/ChangeLog 6 Oct 2003 17:07:16 -0000 1.544.2.16
> +++ composer/ChangeLog 9 Dec 2003 08:15:26 -0000
> @@ -1,3 +1,8 @@
> +2003-12-09 Antonio Xu <antonio xu sun com>
> +
> + * e-msg-composer.c (get_file_content): Add a judgement to avoid
> + adding null filter into filtered stream. Fixes bug #51924.
> +
> 2003-09-26 Jeffrey Stedfast <fejj ximian com>
>
> * e-msg-composer.c (save): Don't blindly claim that the file
> Index: mail/ChangeLog
> ===================================================================
> RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
> retrieving revision 1.2761.2.38
> diff -u -r1.2761.2.38 ChangeLog
> --- mail/ChangeLog 1 Dec 2003 22:42:11 -0000 1.2761.2.38
> +++ mail/ChangeLog 9 Dec 2003 08:15:57 -0000
> @@ -1,3 +1,8 @@
> +2003-12-09 Antonio Xu <antonio xu sun com>
> +
> + * mail-config.c (mail_config_signature_run_script): Add a judgement
> + to avoid adding null filter into filtered stream. Fixes bug #51924.
> +
> 2003-12-01 Jeffrey Stedfast <fejj ximian com>
>
> * mail-config.c (mail_config_signature_run_script): Use fcntl() to
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]