2005-09-10 [colin] 1.9.14cvs14
authorColin Leroy <colin@colino.net>
Sat, 10 Sep 2005 12:01:58 +0000 (12:01 +0000)
committerColin Leroy <colin@colino.net>
Sat, 10 Sep 2005 12:01:58 +0000 (12:01 +0000)
* src/imap.c
Fix a possible crash

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

index 3d0cb5461b0a98d8ad1b26753fda546d4d081592..a06d920e52a025fbb73345dba3201dc3ab4390fa 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-10 [colin]     1.9.14cvs14
+
+       * src/imap.c
+               Fix a possible crash
+
 2005-09-09 [colin]     1.9.14cvs13
 
        * src/imap.c
index fb3e9d3635548efc3d0edb5d3aface9dbbdbba40..c7a28d77578ffbcceef7453cd37fae7c0c4f07d5 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.274.2.62 -r 1.274.2.63 src/mainwindow.c;  cvs diff -u -r 1.1.4.10 -r 1.1.4.11 src/common/xml.c;  ) > 1.9.14cvs11.patchset
 ( cvs diff -u -r 1.100.2.24 -r 1.100.2.25 AUTHORS;  cvs diff -u -r 1.654.2.822 -r 1.654.2.823 configure.ac;  cvs diff -u -r -1.11.2.2 -r -1.11.2.3 po/zh_TW.Big5.po;  diff -u /dev/null po/zh_TW.po;  ) > 1.9.14cvs12.patchset
 ( cvs diff -u -r 1.179.2.68 -r 1.179.2.69 src/imap.c;  cvs diff -u -r 1.274.2.63 -r 1.274.2.64 src/mainwindow.c;  cvs diff -u -r 1.39.2.5 -r 1.39.2.6 src/mainwindow.h;  cvs diff -u -r 1.5.2.9 -r 1.5.2.10 src/prefs_spelling.c;  cvs diff -u -r 1.1.4.19 -r 1.1.4.20 src/etpan/imap-thread.c;  cvs diff -u -r 1.1.4.5 -r 1.1.4.6 src/etpan/imap-thread.h;  cvs diff -u -r 1.12.2.20 -r 1.12.2.21 src/gtk/prefswindow.c;  ) > 1.9.14cvs13.patchset
+( cvs diff -u -r 1.179.2.69 -r 1.179.2.70 src/imap.c;  ) > 1.9.14cvs14.patchset
index c6edf0d0118a4ab6e742e611798b8d7f385b9788..0e68729838a622198bca33d1446f3cb9a7b9e8fc 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=14
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=13
+EXTRA_VERSION=14
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 211dc3a4d1ab1dda2c3894f0a17b7657d8d07368..5270bd6beaabd1bc5e07594cfb0893972f3d67ae 100644 (file)
@@ -1003,17 +1003,23 @@ static gint imap_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list,
                                iflags |= IMAP_FLAG_SEEN;
                }
                
-               if ((MSG_IS_QUEUED(*fileinfo->flags) || MSG_IS_DRAFT(*fileinfo->flags))
-               && !folder_has_parent_of_type(dest, F_QUEUE)
-               && !folder_has_parent_of_type(dest, F_DRAFT)) {
-                       real_file = get_tmp_file();
-                       file_is_tmp = TRUE;
-                       if (procmsg_remove_special_headers(fileinfo->file, real_file) !=0) {
-                               g_free(real_file);
-                               g_free(destdir);
-                               return -1;
-                       }
-               } else 
+               if (fileinfo->flags) {
+                       if ((MSG_IS_QUEUED(*fileinfo->flags) 
+                            || MSG_IS_DRAFT(*fileinfo->flags))
+                       && !folder_has_parent_of_type(dest, F_QUEUE)
+                       && !folder_has_parent_of_type(dest, F_DRAFT)) {
+                               real_file = get_tmp_file();
+                               file_is_tmp = TRUE;
+                               if (procmsg_remove_special_headers(
+                                               fileinfo->file, 
+                                               real_file) !=0) {
+                                       g_free(real_file);
+                                       g_free(destdir);
+                                       return -1;
+                               }
+                       } 
+               }
+               if (real_file == NULL)
                        real_file = g_strdup(fileinfo->file);
                
                if (folder_has_parent_of_type(dest, F_QUEUE) ||