2005-09-29 [paul] 1.9.14cvs61
authorPaul Mangan <paul@claws-mail.org>
Thu, 29 Sep 2005 09:14:46 +0000 (09:14 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 29 Sep 2005 09:14:46 +0000 (09:14 +0000)
* src/plugins/pgpinline/pgpinline.c
fix bug 819, 'crash accessing sign message'
Patch by Colin

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/plugins/pgpinline/pgpinline.c

index 2609094..c041057 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-29 [paul]      1.9.14cvs61
+
+       * src/plugins/pgpinline/pgpinline.c
+               fix bug 819, 'crash accessing sign message'
+               Patch by Colin
+
 2005-09-28 [martin]    1.9.14cvs60
 
        * src/plugins/trayicon/libeggtrayicon/eggtrayicon.c
index 958215b..519df72 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/plugins/pgpcore/sgpgme.c;  ) > 1.9.14cvs58.patchset
 ( cvs diff -u -r 1.9.2.29 -r 1.9.2.30 src/gtk/gtkaspell.c;  ) > 1.9.14cvs59.patchset
 ( cvs diff -u -r 1.1.4.5 -r 1.1.4.6 src/plugins/trayicon/libeggtrayicon/eggtrayicon.c;  ) > 1.9.14cvs60.patchset
+( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/plugins/pgpinline/pgpinline.c;  ) > 1.9.14cvs61.patchset
index 2f60300..259df42 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=14
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=60
+EXTRA_VERSION=61
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 169d39f..724f58f 100644 (file)
@@ -165,7 +165,19 @@ static gint pgpinline_check_signature(MimeInfo *mimeinfo)
        /* gtk2: convert back from utf8 */
        tmp = conv_codeset_strdup(textdata, CS_UTF_8,
                        procmime_mimeinfo_get_parameter(mimeinfo, "charset"));
+       if (!tmp) {
+               tmp = conv_codeset_strdup(textdata, CS_UTF_8,
+                       conv_get_locale_charset_str_no_utf8());
+       }
+       if (!tmp) {
+               g_warning("Can't convert charset to anything sane\n");
+               tmp = conv_codeset_strdup(textdata, CS_UTF_8, CS_US_ASCII);
+       }
        g_free(textdata);
+
+       if (!tmp)
+               return 0;
+
        textdata = g_strdup(tmp);
        g_free(tmp);