diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2008-08-11 14:28:32 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2008-08-11 14:28:32 +0800 |
commit | 048d28f277a04f0c0a1575914804409ad8fa6ad4 (patch) | |
tree | c8cc21103eedfd0e6e960983dc5dac15c155aea5 | |
parent | a952ffe78cb5743e077ffcdf123f14d05e9243d7 (diff) | |
download | gsoc2013-evolution-048d28f277a04f0c0a1575914804409ad8fa6ad4.tar.gz gsoc2013-evolution-048d28f277a04f0c0a1575914804409ad8fa6ad4.tar.zst gsoc2013-evolution-048d28f277a04f0c0a1575914804409ad8fa6ad4.zip |
Don't use uninitialized exception. It leads to freeing uninitialized
2008-08-11 Srinivasa Ragavan <sragavan@novell.com>
* mail/message-list.c: Don't use uninitialized exception. It leads to
freeing uninitialized memory.
svn path=/trunk/; revision=35951
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/message-list.c | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 84f7066075..5443c1478e 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2008-08-11 Srinivasa Ragavan <sragavan@novell.com> + + * mail/message-list.c: Don't use uninitialized exception. It leads to + freeing uninitialized memory. + 2008-08-07 Paul Bolle <pebolle@tiscali.nl> ** Fix for bug #546788 diff --git a/mail/message-list.c b/mail/message-list.c index e12d304505..d6d5ec7f50 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -4076,9 +4076,15 @@ regen_list_exec (struct _regen_list_msg *m) m->tree = camel_folder_thread_messages_new (m->folder, showuids, m->thread_subject); } else { m->summary = g_ptr_array_new (); - if (showuids->len != camel_folder_summary_cache_size (m->folder->summary) ) { - CamelException ex; + if (showuids->len > camel_folder_summary_cache_size (m->folder->summary) ) { + CamelException ex; + camel_exception_init (&ex); camel_folder_summary_reload_from_db (m->folder->summary, &ex); + if (camel_exception_is_set (&ex)) { + g_warning ("Exception while reloading: %s\n", camel_exception_get_description (&ex)); + camel_exception_clear (&ex); + } + } for (i = 0; i < showuids->len; i++) { info = camel_folder_get_message_info (m->folder, showuids->pdata[i]); |