2005-10-20 [colin] 1.9.15cvs81
authorColin Leroy <colin@colino.net>
Thu, 20 Oct 2005 16:48:27 +0000 (16:48 +0000)
committerColin Leroy <colin@colino.net>
Thu, 20 Oct 2005 16:48:27 +0000 (16:48 +0000)
* src/imap.c
* src/etpan/imap-thread.c
Fix possible crash.

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/etpan/imap-thread.c
src/imap.c

index d8b527c59e9ae90696e6d258b978b7d5d7184b4f..bbd3d429fae70bf06710112d63d64c1475bcfa84 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-20 [colin]     1.9.15cvs81
+
+       * src/imap.c
+       * src/etpan/imap-thread.c
+               Fix possible crash.
+
 2005-10-20 [paul]      1.9.15cvs80
 
        * src/folder.c
index 2836f6a2fe6feb9d09c5796e5a772bfdf4c459f6..2285cc8b70ce1fe29c068de2542191c83d426387 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.27 -r 1.1.2.28 src/plugins/pgpmime/pgpmime.c;  ) > 1.9.15cvs78.patchset
 ( cvs diff -u -r 1.100.2.27 -r 1.100.2.28 AUTHORS;  cvs diff -u -r 1.1.2.28 -r 1.1.2.29 src/plugins/pgpmime/pgpmime.c;  ) > 1.9.15cvs79.patchset
 ( cvs diff -u -r 1.213.2.65 -r 1.213.2.66 src/folder.c;  ) > 1.9.15cvs80.patchset
+( cvs diff -u -r 1.179.2.80 -r 1.179.2.81 src/imap.c;  cvs diff -u -r 1.1.4.23 -r 1.1.4.24 src/etpan/imap-thread.c;  ) > 1.9.15cvs81.patchset
index 972e3933a7ceadfd780500d47b341eae292df6bc..d69d2b7cd70bd35eddb05532ac72b16e56762099 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=80
+EXTRA_VERSION=81
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index d491a210c8676260f5e6845a37e371fc121e825b..9b7a122df2067620d1b96a6c6e6d0f22fe5e82a8 100644 (file)
@@ -1723,6 +1723,8 @@ fetch_to_env_info(struct mailimap_msg_att * msg_att)
        imap_get_msg_att_info(msg_att, &uid, &headers, &size,
                              &att_dyn);
        
+       if (!headers)
+               return NULL;
        info = malloc(sizeof(* info));
        info->uid = uid;
        info->headers = strdup(headers);
@@ -1739,7 +1741,6 @@ imap_fetch_result_to_envelop_list(clist * fetch_result,
        clistiter * cur;
        unsigned int i;
        carray * env_list;
-  
        i = 0;
   
        env_list = carray_new(16);
@@ -1752,6 +1753,8 @@ imap_fetch_result_to_envelop_list(clist * fetch_result,
                msg_att = clist_content(cur);
 
                env_info = fetch_to_env_info(msg_att);
+               if (!env_info)
+                       return MAILIMAP_ERROR_MEMORY;
                carray_add(env_list, env_info, NULL);
        }
   
index 92ba6f0c7402d937f0fddf03ca5ccf92396e1331..1052c6389252c46c05974c1a1f1e2a13521e91ca 100644 (file)
@@ -2027,6 +2027,8 @@ static void *imap_get_uncached_messages_thread(void *data)
                        
                        info = carray_get(env_list, i);
                        msginfo = imap_envelope_from_lep(info, item);
+                       if (msginfo == NULL)
+                               continue;
                        msginfo->folder = item;
                        if (!newlist)
                                llast = newlist = g_slist_append(newlist, msginfo);
@@ -4117,6 +4119,9 @@ static MsgInfo *imap_envelope_from_lep(struct imap_fetch_env_info * info,
        size_t size = 0;
        MsgFlags flags = {0, 0};
        
+       if (info->headers == NULL)
+               return NULL;
+
        MSG_SET_TMP_FLAGS(flags, MSG_IMAP);
        if (folder_has_parent_of_type(item, F_QUEUE)) {
                MSG_SET_TMP_FLAGS(flags, MSG_QUEUED);