[libsoup] Fix invalid read in soup_cookie_applies_to_uri()



commit 1c5905038610582546a6560f91b402c32c333c24
Author: Dan Winship <danw gnome org>
Date:   Sat Jan 23 15:35:05 2010 -0500

    Fix invalid read in soup_cookie_applies_to_uri()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=607024

 libsoup/soup-cookie.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libsoup/soup-cookie.c b/libsoup/soup-cookie.c
index 536b387..8ac39dc 100644
--- a/libsoup/soup-cookie.c
+++ b/libsoup/soup-cookie.c
@@ -924,6 +924,8 @@ soup_cookie_applies_to_uri (SoupCookie *cookie, SoupURI *uri)
 	g_return_val_if_fail (uri->path != NULL, FALSE);
 
 	plen = strlen (cookie->path);
+	if (plen == 0)
+		return TRUE;
 	if (strncmp (cookie->path, uri->path, plen) != 0)
 		return FALSE;
 	if (cookie->path[plen - 1] != '/' &&



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]