← Commit list

80005b4c8a

Daniel Stenberg
Daniel Stenberg
2025-11-18
SUCCESS Duration: 155s

Subject

cookie: return error on OOM

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/cookie.c+4 -3
@@ -464,10 +464,11 @@ parse_cookie_header(struct Curl_easy *data,
return CURLE_OK;
strstore(&co->name, curlx_str(&name), curlx_strlen(&name));
- strstore(&co->value, curlx_str(&val), curlx_strlen(&val));
- done = TRUE;
+ if(co->name)
+ strstore(&co->value, curlx_str(&val), curlx_strlen(&val));
if(!co->name || !co->value)
- return CURLE_OK;
+ return CURLE_OUT_OF_MEMORY;
+ done = TRUE;
if(invalid_octets(co->value) || invalid_octets(co->name)) {
infof(data, "invalid octets in name/value, cookie dropped");