summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lord <chrisl@src.gnome.org>2008-04-14 21:15:49 +0000
committerChris Lord <chrisl@src.gnome.org>2008-04-14 21:15:49 +0000
commitd60f365466271d1db404d7397c53de9407ffb8a3 (patch)
tree02a5a8691a06d3ba53aa12c4b282fbf91c032632
parent8e58c854675aa26eb0d33212822cac3223d0c8a9 (diff)
downloadlibsoup-d60f365466271d1db404d7397c53de9407ffb8a3.tar.gz
Check that the cookie was parsed successfully before setting it
* libsoup/soup-cookie-jar.c (soup_cookie_jar_set_cookie): Check that the cookie was parsed successfully before setting it svn path=/trunk/; revision=1136
-rw-r--r--ChangeLog7
-rw-r--r--libsoup/soup-cookie-jar.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ef59cb1..4c81431a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-14 Chris Lord <chrislord.net@gmail.com>
+
+ reviewed by: Dan Winship <danw@gnome.org>
+
+ * libsoup/soup-cookie-jar.c (soup_cookie_jar_set_cookie):
+ Check that the cookie was parsed successfully before setting it
+
2008-04-08 Dan Winship <danw@gnome.org>
Initial HTTP cookie support imported from development git repo,
diff --git a/libsoup/soup-cookie-jar.c b/libsoup/soup-cookie-jar.c
index 2503f20a..46fc1a71 100644
--- a/libsoup/soup-cookie-jar.c
+++ b/libsoup/soup-cookie-jar.c
@@ -263,8 +263,10 @@ soup_cookie_jar_set_cookie (SoupCookieJar *jar, SoupURI *uri,
g_return_if_fail (cookie != NULL);
soup_cookie = soup_cookie_parse (cookie, uri);
- set_cookie (jar, soup_cookie);
- /* set_cookie will steal or free soup_cookie */
+ if (soup_cookie) {
+ set_cookie (jar, soup_cookie);
+ /* set_cookie will steal or free soup_cookie */
+ }
}
static void