2010-05-14 [colin] 3.7.6cvs3
authorColin Leroy <colin@colino.net>
Fri, 14 May 2010 06:42:25 +0000 (06:42 +0000)
committerColin Leroy <colin@colino.net>
Fri, 14 May 2010 06:42:25 +0000 (06:42 +0000)
* src/plugins/pgpinline/pgpinline.c
Fix bug 2205, 'PGPInline: segfault on malformed mails'

ChangeLog
PATCHSETS
configure.ac
src/plugins/pgpinline/pgpinline.c

index 2fba70d32e7383b252ce2e97b0e7d22d7fd89a18..b04e8132569ffba0a5a43e1f0268f3d15505ae1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-14 [colin]     3.7.6cvs3
+
+       * src/plugins/pgpinline/pgpinline.c
+               Fix bug 2205, 'PGPInline: segfault on malformed mails'
+
 2010-05-04 [iwkse]     3.7.6cvs2
 
        * src/prefs_message.c
index d7085089a2455d67e950a4a3adb82aedbe9fea23..18c1d6461892410d13a5d3839bc12bcdcf12eaa0 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.23 -r 1.1.2.24 tools/claws.i18n.status.pl;  ) > 3.7.5cvs55.patchset
 ( cvs diff -u -r 1.1.2.30 -r 1.1.2.31 src/prefs_message.c;  cvs diff -u -r 1.103.2.128 -r 1.103.2.129 src/prefs_common.h;  cvs diff -u -r 1.204.2.195 -r 1.204.2.196 src/prefs_common.c;  cvs diff -u -r 1.96.2.223 -r 1.96.2.224 src/textview.c;  ) > 3.7.6cvs1.patchset
 ( cvs diff -u -r 1.1.2.31 -r 1.1.2.32 src/prefs_message.c;  ) > 3.7.6cvs2.patchset
+( cvs diff -u -r 1.1.2.44 -r 1.1.2.45 src/plugins/pgpinline/pgpinline.c;  ) > 3.7.6cvs3.patchset
index e699bfb7123d30f4aee0f8e927f4a3f3cb163a75..2e31026a6afc99b474cf99533c8cc46935b2eaa9 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=2
+EXTRA_VERSION=3
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index f4784bb58a8761cbbffaff328dc4e8253c1dbb0d..c89d2fe91cf31c5b74d1105b8614b54034295d5e 100644 (file)
@@ -583,9 +583,14 @@ static gboolean pgpinline_sign(MimeInfo *mimeinfo, PrefsAccount *account, const
 
        /* get content node from message */
        msgcontent = (MimeInfo *) mimeinfo->node->children->data;
-       if (msgcontent->type == MIMETYPE_MULTIPART)
+       if (msgcontent->type == MIMETYPE_MULTIPART) {
+               if (!msgcontent->node->children) {
+                       debug_print("msgcontent->node->children NULL, bailing\n");
+                       privacy_set_error(_("Malformed message"));
+                       return FALSE;
+               }
                msgcontent = (MimeInfo *) msgcontent->node->children->data;
-
+       }
        /* get rid of quoted-printable or anything */
        procmime_decode_content(msgcontent);
 
@@ -768,9 +773,14 @@ static gboolean pgpinline_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
 
        /* get content node from message */
        msgcontent = (MimeInfo *) mimeinfo->node->children->data;
-       if (msgcontent->type == MIMETYPE_MULTIPART)
+       if (msgcontent->type == MIMETYPE_MULTIPART) {
+               if (!msgcontent->node->children) {
+                       debug_print("msgcontent->node->children NULL, bailing\n");
+                       privacy_set_error(_("Malformed message"));
+                       return FALSE;
+               }
                msgcontent = (MimeInfo *) msgcontent->node->children->data;
-
+       }
        /* get rid of quoted-printable or anything */
        procmime_decode_content(msgcontent);