diff --git a/src/cookies/path.c b/src/cookies/path.c index f5578937..c51bc859 100644 --- a/src/cookies/path.c +++ b/src/cookies/path.c @@ -8,6 +8,8 @@ is_path_prefix(char *cookiepath, char *requestpath) { int dl = strlen(cookiepath); + if (!dl) return 1; + if (memcmp(cookiepath, requestpath, dl)) return 0; return (!memcmp(cookiepath, requestpath, dl)