+4
−3
Loading
A "Cookie:" header without a value has no Values; parse() read
hc->getfirstValue()->getvalue() into an unused string and dereferenced
null: one request (curl -H 'Cookie;', or Node's fetch with Cookie: '')
took down any server that parses cookies -- found with mammut's admin
interface, which segfaulted on it over HTTP/1.1 and HTTP/2 alike.
The unused line is gone and the loop runs over hc's values (none: no
cookies). http_cookie_headers_test sends "Cookie: ", "Cookie:",
"Cookie: ;" and "Cookie: a=1; ; b=2" to HttpCookie::parse (11/11; the
process crashes on the first of them without the fix).
Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>