diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2016-06-08 13:58:35 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2016-06-08 13:58:37 +0900 |
commit | f7891841031caca7360016ea27941b2ab0b12078 (patch) | |
tree | d2a5670f5c0d08c3dc687b583ebd27a8113a0c45 | |
parent | 8220df52bc47a14ab63abf09cb41414afcbde678 (diff) | |
download | libsoup-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-x | libsoup/soup-cookie-jar.c | 6 |
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); |