urlapi: avoid null deref if setting blank host to url encode
Reported-by: kirbyn17 on hackerone Closes #12240
This commit is contained in:
Родитель
27f2352d49
Коммит
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. */
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче