diff options
author | Patrick Griffis <pgriffis@igalia.com> | 2022-11-14 15:33:19 -0600 |
---|---|---|
committer | Patrick Griffis <pgriffis@igalia.com> | 2022-11-14 15:33:19 -0600 |
commit | c508111583699d4070dfd891c669d2932e8ec8ee (patch) | |
tree | f4e2e9a2f0e2a657b3ffa4bea36a023f7029f33d | |
parent | af20c811044fa89fcb134fa567be136acc3e8aac (diff) | |
download | libsoup-c508111583699d4070dfd891c669d2932e8ec8ee.tar.gz |
cookie: Fix soup_cookie_equal() with NULL path
It is valid for a SoupCookie to be constructed with a NULL path
and strcmp() isn't NULL safe.
-rw-r--r-- | libsoup/cookies/soup-cookie.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libsoup/cookies/soup-cookie.c b/libsoup/cookies/soup-cookie.c index 52310ed5..731bd622 100644 --- a/libsoup/cookies/soup-cookie.c +++ b/libsoup/cookies/soup-cookie.c @@ -1080,5 +1080,5 @@ soup_cookie_equal (SoupCookie *cookie1, SoupCookie *cookie2) return (!strcmp (cookie1->name, cookie2->name) && !strcmp (cookie1->value, cookie2->value) && - !strcmp (cookie1->path, cookie2->path)); + !g_strcmp0 (cookie1->path, cookie2->path)); } |