[Fwd: Re: [evolution-patches] Patch for bug #51924,Mailer related for 1.4 branch]



 Resend this my patch again, Hope someone can review my patch.

Anto

-------- Original Message --------
Subject: Re: [evolution-patches] Patch for bug #51924,Mailer related for 1.4 branch
Date: Mon, 15 Dec 2003 23:04:01 +0800
From: Antonio Xu <antonio xu sun com>
To: Jeffrey Stedfast <fejj ximian com>
CC: <evolution-patches ximian com>



Hello Jeffrey,

Thanks for your comments, I have created two new patches, one is created
according to your advice. Another one also can fix this bug, it  use a
judgment to check NULL pointer to avoid add NULL filter into filtered
stream. Please review them.

Thanks
Anto
On 12/9/03 22:52, "Jeffrey Stedfast"  wrote:

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 +
+    * 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 * 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 +
+    * 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 * mail-config.c (mail_config_signature_run_script): Use fcntl() to

_______________________________________________
Evolution-patches mailing list
Evolution-patches lists ximian com
http://lists.ximian.com/mailman/listinfo/evolution-patches




Attachment: patch2.diff
Description: Binary data

Attachment: patch1.diff
Description: Binary data



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