From: Daniel Stenberg Date: Fri, 9 Nov 2018 09:49:14 +0000 (+0100) Subject: curl: --local-port range was not "including" X-Git-Tag: curl-7_63_0~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fcf3f133682d5d5c853290841accd5170d2ccc70;p=curl 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 --- diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 5dc4141fa..4e06cd61e 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -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; }