commit a374b0bd752b6e902b234e0d81e08f2de89a7871
parent b60638353a56cba434c2ffd00d8e4feb8537f204
Author: Colin Leroy <colin@colino.net>
Date: Fri, 14 May 2010 06:42:25 +0000
2010-05-14 [colin] 3.7.6cvs3
* src/plugins/pgpinline/pgpinline.c
Fix bug 2205, 'PGPInline: segfault on malformed mails'
Diffstat:
4 files changed, 21 insertions(+), 5 deletions(-)
diff --git 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
diff --git a/PATCHSETS b/PATCHSETS
@@ -3998,3 +3998,4 @@
( 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
diff --git a/configure.ac b/configure.ac
@@ -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=
diff --git a/src/plugins/pgpinline/pgpinline.c b/src/plugins/pgpinline/pgpinline.c
@@ -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);