mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:33:42 +03:00
urlapi: accept port number zero
This is a regression since 7.62.0 (fb30ac5a2d).
Updated test 1560 accordingly
Reported-by: Brad Fitzpatrick
Fixes #8090
Closes #8091
This commit is contained in:
parent
f67b4d37b7
commit
92d1aee8b1
2 changed files with 6 additions and 4 deletions
|
|
@ -605,9 +605,7 @@ UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, char *hostname,
|
|||
|
||||
port = strtol(portptr + 1, &rest, 10); /* Port number must be decimal */
|
||||
|
||||
if((port <= 0) || (port > 0xffff))
|
||||
/* Single unix standard says port numbers are 16 bits long, but we don't
|
||||
treat port zero as OK. */
|
||||
if(port > 0xffff)
|
||||
return CURLUE_BAD_PORT_NUMBER;
|
||||
|
||||
if(rest[0])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue