mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:23:39 +03:00
urlapi: treat 0 alone as decimal number in IPv4 address
Not as a broken octcal. Regression from b4538ec522
Extended test 1560 to verify this behavior.
Reported-by: Carlos Henrique Lima Melara
Closes #16652
This commit is contained in:
parent
bad5e71331
commit
19d6415273
2 changed files with 35 additions and 3 deletions
|
|
@ -578,9 +578,8 @@ static int ipv4_normalize(struct dynbuf *host)
|
|||
int rc;
|
||||
curl_off_t l;
|
||||
if(*c == '0') {
|
||||
c++;
|
||||
if(*c == 'x') {
|
||||
c++; /* skip the prefix */
|
||||
if(c[1] == 'x') {
|
||||
c += 2; /* skip the prefix */
|
||||
rc = Curl_str_hex(&c, &l, UINT_MAX);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue