[evolution-data-server] [IMAPx] Crash under imapx_server_info_changed_cb()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] [IMAPx] Crash under imapx_server_info_changed_cb()
- Date: Tue, 19 Apr 2016 10:51:50 +0000 (UTC)
commit a22457eef664d228f022ce52776290cf1aa2e036
Author: Milan Crha <mcrha redhat com>
Date: Tue Apr 19 12:45:55 2016 +0200
[IMAPx] Crash under imapx_server_info_changed_cb()
It could happen that with a specific thread interleaving
the imapx_server_info_changed_cb() could be called with a message
info which didn't have set the UID. As it's a valid state, then
count with it.
This had been reported downstream as:
https://bugzilla.redhat.com/show_bug.cgi?id=1328330
camel/providers/imapx/camel-imapx-server.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index d01f464..60ebf08 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -5153,9 +5153,13 @@ imapx_server_info_changed_cb (CamelIMAPXSummary *summary,
g_return_if_fail (info != NULL);
g_return_if_fail (changed_meanwhile != NULL);
- g_hash_table_insert (changed_meanwhile,
- (gpointer) camel_pstring_strdup (camel_message_info_uid (info)),
- GINT_TO_POINTER (1));
+ /* The UID can be NULL in case of a newly fetched message, for example when creating
+ the message info in imapx_untagged_fetch() by camel_folder_summary_info_new_from_parser() */
+ if (camel_message_info_uid (info)) {
+ g_hash_table_insert (changed_meanwhile,
+ (gpointer) camel_pstring_strdup (camel_message_info_uid (info)),
+ GINT_TO_POINTER (1));
+ }
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]