urlapi: avoid null deref if setting blank host to url encode
Reported-by: kirbyn17 on hackerone Closes #12240
This commit is contained in:
parent
27f2352d49
commit
c64d0d67fd
@ -1931,8 +1931,8 @@ nomem:
|
||||
}
|
||||
}
|
||||
|
||||
if(what == CURLUPART_HOST) {
|
||||
size_t n = strlen(newp);
|
||||
else if(what == CURLUPART_HOST) {
|
||||
size_t n = Curl_dyn_len(&enc);
|
||||
if(!n && (flags & CURLU_NO_AUTHORITY)) {
|
||||
/* Skip hostname check, it's allowed to be empty. */
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user