[evolution-data-server] Fix a crash under e_webdav_discover_traverse_propfind_response_cb()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Fix a crash under e_webdav_discover_traverse_propfind_response_cb()
- Date: Fri, 9 Jun 2017 10:01:46 +0000 (UTC)
commit af997bc141094aec86752d567231d914b8b0602c
Author: Milan Crha <mcrha redhat com>
Date: Fri Jun 9 11:59:24 2017 +0200
Fix a crash under e_webdav_discover_traverse_propfind_response_cb()
In some cases, like when evolution-source-registry searches for ownCloud
sources, the out_calendar_user_addresses could be NULL, but the crashing
function had been dereferencing it anyway.
src/libedataserver/e-webdav-discover.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/libedataserver/e-webdav-discover.c b/src/libedataserver/e-webdav-discover.c
index 43eaeff..8621a5e 100644
--- a/src/libedataserver/e-webdav-discover.c
+++ b/src/libedataserver/e-webdav-discover.c
@@ -174,7 +174,10 @@ e_webdav_discover_traverse_propfind_response_cb (EWebDAVSession *webdav,
if (xpath_obj) {
gint ii, length;
- length = xmlXPathNodeSetGetLength (xpath_obj->nodesetval);
+ if (wdd->out_calendar_user_addresses)
+ length = xmlXPathNodeSetGetLength (xpath_obj->nodesetval);
+ else
+ length = 0;
for (ii = 0; ii < length; ii++) {
gchar *address_href;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]