From fcf3f133682d5d5c853290841accd5170d2ccc70 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 9 Nov 2018 10:49:14 +0100 Subject: [PATCH] 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 --- src/tool_getparam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 5dc4141fad..4e06cd61ea 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; }