urlapi: skip appending NULL pointer query
Reported-by: kirbyn17 on hackerone Closes #12240
This commit is contained in:
parent
21c5d5971e
commit
ffbc9981c4
@ -1902,7 +1902,7 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
|
||||
}
|
||||
newp = Curl_dyn_ptr(&enc);
|
||||
|
||||
if(appendquery) {
|
||||
if(appendquery && newp) {
|
||||
/* Append the 'newp' string onto the old query. Add a '&' separator if
|
||||
none is present at the end of the existing query already */
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user