From a53f2cfc49ffcaaa958e0cee019bf6b451b27855 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Sat, 10 Sep 2005 12:01:58 +0000 Subject: [PATCH] 2005-09-10 [colin] 1.9.14cvs14 * src/imap.c Fix a possible crash --- ChangeLog-gtk2.claws | 5 +++++ PATCHSETS | 1 + configure.ac | 2 +- src/imap.c | 28 +++++++++++++++++----------- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/ChangeLog-gtk2.claws b/ChangeLog-gtk2.claws index 3d0cb5461..a06d920e5 100644 --- a/ChangeLog-gtk2.claws +++ b/ChangeLog-gtk2.claws @@ -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 diff --git a/PATCHSETS b/PATCHSETS index fb3e9d363..c7a28d775 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -782,3 +782,4 @@ ( 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 diff --git a/configure.ac b/configure.ac index c6edf0d01..0e6872983 100644 --- a/configure.ac +++ b/configure.ac @@ -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= diff --git a/src/imap.c b/src/imap.c index 211dc3a4d..5270bd6be 100644 --- a/src/imap.c +++ b/src/imap.c @@ -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) || -- 2.25.1