← Commit list

318cd4f2ee

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

Subject

lib: error for OOM when extracting URL query

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/imap.c+4 -2
@@ -2315,8 +2315,10 @@ static CURLcode imap_parse_url_path(struct Curl_easy *data,
and no UID as per RFC-5092 */
if(imap->mailbox && !imap->uid && !imap->mindex) {
/* Get the query parameter, URL decoded */
- (void)curl_url_get(data->state.uh, CURLUPART_QUERY, &imap->query,
- CURLU_URLDECODE);
+ CURLUcode uc = curl_url_get(data->state.uh, CURLUPART_QUERY, &imap->query,
+ CURLU_URLDECODE);
+ if(uc == CURLUE_OUT_OF_MEMORY)
+ return CURLE_OUT_OF_MEMORY;
}
/* Any extra stuff at the end of the URL is an error */
lib/url.c+3 -1
@@ -1974,7 +1974,9 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data,
conn->remote_port = (unsigned short)port;
}
- (void)curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query, 0);
+ uc = curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query, 0);
+ if(uc && (uc != CURLUE_NO_QUERY))
+ return CURLE_OUT_OF_MEMORY;
#ifdef USE_IPV6
if(data->set.scope_id)