aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-11-09 10:49:14 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-11-09 22:34:14 +0100
commitfcf3f133682d5d5c853290841accd5170d2ccc70 (patch)
tree11e191474f3fd8ae3940f9f7b8dc50e589c97b35
parent27cb384679154b050f1008c0382e8345b7abbc41 (diff)
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
-rw-r--r--src/tool_getparam.c2
1 files changed, 1 insertions, 1 deletions
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;
}