From: Colin Leroy Date: Fri, 5 Jan 2007 13:16:32 +0000 (+0000) Subject: 2007-01-05 [paul] 2.6.1cvs110 X-Git-Tag: rel_2_7_0~11 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=de48dcf9cf4defdce43cf5dbf4d2b676d081e4d6;hp=a60cb9bfd1b1fb00237958c9045a86e961fbe257 2007-01-05 [paul] 2.6.1cvs110 * src/imap.c Fix bug 934, 'sylpheed claws 2.1 doesn't show Exchanges Public Folders' Thanks to Hoa and Colin * src/msgcache.c Refuse to allocate more than 2 MB for a single field, it's a good indication of cache corruption. --- diff --git a/ChangeLog b/ChangeLog index 7d8740e76..07ebe54fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-01-05 [paul] 2.6.1cvs110 + + * src/imap.c + Fix bug 934, 'sylpheed claws 2.1 + doesn't show Exchanges Public Folders' + Thanks to Hoa and Colin + * src/msgcache.c + Refuse to allocate more than 2 MB for a + single field, it's a good indication of + cache corruption. + 2007-01-05 [colin] 2.6.1cvs109 * src/mainwindow.c diff --git a/PATCHSETS b/PATCHSETS index 717f5c212..9d6a76efe 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -2217,3 +2217,4 @@ ( cvs diff -u -r 1.3.2.10 -r 1.3.2.11 src/common/quoted-printable.c; ) > 2.6.1cvs107.patchset ( cvs diff -u -r 1.3.2.11 -r 1.3.2.12 src/common/quoted-printable.c; ) > 2.6.1cvs108.patchset ( cvs diff -u -r 1.274.2.159 -r 1.274.2.160 src/mainwindow.c; ) > 2.6.1cvs109.patchset +( cvs diff -u -r 1.179.2.145 -r 1.179.2.146 src/imap.c; cvs diff -u -r 1.16.2.48 -r 1.16.2.49 src/msgcache.c; ) > 2.6.1cvs110.patchset diff --git a/configure.ac b/configure.ac index 1ba3d0b82..a179d4e9a 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=6 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=109 +EXTRA_VERSION=110 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/imap.c b/src/imap.c index 509250aea..e160aea53 100644 --- a/src/imap.c +++ b/src/imap.c @@ -4105,9 +4105,7 @@ static GSList * imap_list_from_lep(IMAPFolder * folder, } if (!all && dup_name[strlen(dup_name)-1] == '/') { - g_free(base); - free(dup_name); - continue; + dup_name[strlen(dup_name)-1] = '\0'; } loc_name = imap_modified_utf7_to_utf8(base); diff --git a/src/msgcache.c b/src/msgcache.c index 518677054..24556d03d 100644 --- a/src/msgcache.c +++ b/src/msgcache.c @@ -504,6 +504,11 @@ static gint msgcache_get_cache_data_str(gchar *src, gchar **str, gint len, if (len == 0) return 0; + if(len > 2*1024*1024) { + g_warning("read_data_str: refusing to allocate %d bytes.\n", len); + return -1; + } + tmpstr = g_try_malloc(len + 1); if(tmpstr == NULL) {