PATCH: Small bug fix for camel-mime-utils.c

View: New views
3 Messages — Rating Filter:   Alert me  

PATCH: Small bug fix for camel-mime-utils.c

by Philip Van Hoof :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Please review

--
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
http://pvanhoof.be/blog
http://codeminded.be




[camel-mime-utils.diff]

Index: camel-mime-utils.c
===================================================================
--- camel-mime-utils.c (revision 8380)
+++ camel-mime-utils.c (working copy)
@@ -920,7 +920,7 @@
  charsets[i++] = default_charset;
 
  locale_charset = e_iconv_locale_charset ();
- if (g_ascii_strcasecmp (locale_charset, "UTF-8") != 0)
+ if (locale_charset && g_ascii_strcasecmp (locale_charset, "UTF-8") != 0)
  charsets[i++] = locale_charset;
 
  min = len;
Index: ChangeLog
===================================================================
--- ChangeLog (revision 8380)
+++ ChangeLog (working copy)
@@ -1,3 +1,7 @@
+2008-01-18  Philip Van Hoof  <pvanhoof@...>
+
+ * camel-mime-utils.c: Small bug fix
+
 2008-01-16  Øystein Gisnås  <oystein@...>
 
  ** Fix for bug #300098


_______________________________________________
Evolution-patches mailing list
Evolution-patches@...
http://mail.gnome.org/mailman/listinfo/evolution-patches

Re: PATCH: Small bug fix for camel-mime-utils.c

by Philip Van Hoof :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Wed, 2008-01-16 at 20:17 +0100, Philip Van Hoof wrote:
> Please review

Hmm the patch might not be right as the check is != 0 in stead of == 0.

Anyway, the problem here is that local_charset can be NULL and that the
strcmp would assert() on the first parameter being NULL.


--
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
http://pvanhoof.be/blog
http://codeminded.be




_______________________________________________
Evolution-patches mailing list
Evolution-patches@...
http://mail.gnome.org/mailman/listinfo/evolution-patches

Re: PATCH: Small bug fix for camel-mime-utils.c

by Jeffrey Stedfast :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No, I think your first patch had it right.

Jeff

On Wed, 2008-01-16 at 20:54 +0100, Philip Van Hoof wrote:
> On Wed, 2008-01-16 at 20:17 +0100, Philip Van Hoof wrote:
> > Please review
>
> Hmm the patch might not be right as the check is != 0 in stead of == 0.
>
> Anyway, the problem here is that local_charset can be NULL and that the
> strcmp would assert() on the first parameter being NULL.
>
>

_______________________________________________
Evolution-patches mailing list
Evolution-patches@...
http://mail.gnome.org/mailman/listinfo/evolution-patches