1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 16:48:49 -05:00

curl: --local-port range was not "including"

The end port number in a given range was not included in the range used,
as it is documented to be.

Reported-by: infinnovation-dev on github
Fixes #3251
Closes #3255
This commit is contained in:
Daniel Stenberg 2018-11-09 10:49:14 +01:00
parent 27cb384679
commit fcf3f13368
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -958,7 +958,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
err = str2unum(&config->localportrange, lrange);
if(err || (config->localportrange > 65535))
return PARAM_BAD_USE;
config->localportrange -= config->localport;
config->localportrange -= (config->localport-1);
if(config->localportrange < 1)
return PARAM_BAD_USE;
}