summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2016-06-08 13:58:35 +0900
committerSeonah Moon <seonah1.moon@samsung.com>2016-06-08 13:58:37 +0900
commitf7891841031caca7360016ea27941b2ab0b12078 (patch)
treed2a5670f5c0d08c3dc687b583ebd27a8113a0c45
parent8220df52bc47a14ab63abf09cb41414afcbde678 (diff)
downloadlibsoup-f7891841031caca7360016ea27941b2ab0b12078.tar.gz
libsoup-f7891841031caca7360016ea27941b2ab0b12078.tar.bz2
libsoup-f7891841031caca7360016ea27941b2ab0b12078.zip
Resolve crash issue about cookie
Change-Id: I27c02a936e654d5fee5395c8b09d0d76ed94ef97 Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
-rwxr-xr-xlibsoup/soup-cookie-jar.c6
1 files changed, 5 insertions, 1 deletions
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);