From f7891841031caca7360016ea27941b2ab0b12078 Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Wed, 8 Jun 2016 13:58:35 +0900 Subject: Resolve crash issue about cookie Change-Id: I27c02a936e654d5fee5395c8b09d0d76ed94ef97 Signed-off-by: Seonah Moon --- libsoup/soup-cookie-jar.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libsoup/soup-cookie-jar.c b/libsoup/soup-cookie-jar.c index 3b988c3b..eac9cd96 100755 --- a/libsoup/soup-cookie-jar.c +++ b/libsoup/soup-cookie-jar.c @@ -338,8 +338,12 @@ get_cookies (SoupCookieJar *jar, SoupURI *uri, gboolean for_http, gboolean copy_ domain_cookies = next; } cur = next_domain; - if (cur) + + if (cur && *cur) next_domain = strchr (cur + 1, '.'); + else + next_domain = NULL; + } while (cur); g_free (domain); -- cgit v1.2.3