[evolution-data-server] [IMAPx] Prevent crash in imapx_update_store_summary()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] [IMAPx] Prevent crash in imapx_update_store_summary()
- Date: Tue, 10 Oct 2017 08:20:17 +0000 (UTC)
commit 5bb1fea8b0db5326bb3585493e0d6f60e6ade8e6
Author: Milan Crha <mcrha redhat com>
Date: Tue Oct 10 10:18:34 2017 +0200
[IMAPx] Prevent crash in imapx_update_store_summary()
The change prevents crash when the folder's parent store is freeing or freed,
in which case the camel_folder_get_parent_store() returns NULL, but it was not
checked for this case in the function, it dereferenced the NULL pointer instead.
It had been reported downstream at:
https://bugzilla.redhat.com/show_bug.cgi?id=1499775
src/camel/providers/imapx/camel-imapx-utils.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/camel/providers/imapx/camel-imapx-utils.c b/src/camel/providers/imapx/camel-imapx-utils.c
index ae5b7cf..82648ed 100644
--- a/src/camel/providers/imapx/camel-imapx-utils.c
+++ b/src/camel/providers/imapx/camel-imapx-utils.c
@@ -404,6 +404,9 @@ imapx_update_store_summary (CamelFolder *folder)
full_name = camel_folder_get_full_name (folder);
parent_store = camel_folder_get_parent_store (folder);
+ if (!parent_store)
+ return;
+
imapx_store = CAMEL_IMAPX_STORE (parent_store);
si = camel_store_summary_path (imapx_store->summary, full_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]