[evolution-data-server/gnome-3-26] Prevent crash when an On The Web calendar has set incorrect URI



commit c2432e21026ff300ad8ea84d1611b282bd8aae11
Author: Milan Crha <mcrha redhat com>
Date:   Wed Oct 11 19:14:04 2017 +0200

    Prevent crash when an On The Web calendar has set incorrect URI
    
    There could happen a NULL dereference at ecb_http_webcal_to_http_method().
    
    It had been reported downstream at:
    https://bugzilla.redhat.com/show_bug.cgi?id=1500663

 src/calendar/backends/http/e-cal-backend-http.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/calendar/backends/http/e-cal-backend-http.c b/src/calendar/backends/http/e-cal-backend-http.c
index d97d065..4f86c5c 100644
--- a/src/calendar/backends/http/e-cal-backend-http.c
+++ b/src/calendar/backends/http/e-cal-backend-http.c
@@ -85,6 +85,11 @@ ecb_http_dup_uri (ECalBackendHttp *cbhttp)
        uri_string = soup_uri_to_string (soup_uri, FALSE);
        soup_uri_free (soup_uri);
 
+       if (!uri_string || !*uri_string) {
+               g_free (uri_string);
+               return NULL;
+       }
+
        uri = ecb_http_webcal_to_http_method (uri_string, secure_connection);
 
        g_free (uri_string);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]