From bcc00043a6d0d065a46298f858b39397efda52a4 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 30 Jul 2010 14:27:46 -0700 Subject: [PATCH] Fix WPAD issue with empty result list --- src/wpad.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wpad.c b/src/wpad.c index c76c63b..5f1f1f5 100644 --- a/src/wpad.c +++ b/src/wpad.c @@ -65,6 +65,9 @@ static void wpad_result(GResolvResultStatus status, if (status == G_RESOLV_RESULT_STATUS_SUCCESS) { char *url; + if (results == NULL || g_strv_length(results) == 0) + return; + url = g_strdup_printf("http://%s/wpad.dat", wpad->hostname); __connman_service_set_proxy_autoconfig(wpad->service, url); g_free(url); -- 2.7.4