lib: error for OOM when extracting URL query

Closes #19594
This commit is contained in:
Daniel Stenberg 2025-11-18 17:01:30 +01:00
parent 9726fc8259
commit 318cd4f2ee
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 7 additions and 3 deletions

View file

@ -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 */