diff options
author | George Kadianakis <desnacked@riseup.net> | 2012-06-22 18:24:06 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-07-06 08:02:14 -0400 |
commit | 62c1311b3ab57c61488ecfc8c94fabb5f2c70e6e (patch) | |
tree | c431e5797f315963afacbdab837a98c2074dee2e | |
parent | e9b33ed1bf4140e3aeda5eb9126027fbe5a3ec5a (diff) | |
download | tor-62c1311b3ab57c61488ecfc8c94fabb5f2c70e6e.tar.gz tor-62c1311b3ab57c61488ecfc8c94fabb5f2c70e6e.zip |
Fix port range in parse_port_range().
-rw-r--r-- | changes/bug6218 | 3 | ||||
-rw-r--r-- | src/common/address.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/changes/bug6218 b/changes/bug6218 new file mode 100644 index 0000000000..5d5d108b00 --- /dev/null +++ b/changes/bug6218 @@ -0,0 +1,3 @@ + o Minor bugfixes: + - Fix wrong TCP port range in parse_port_range(). Fixes bug 6218; + bugfix on 0.2.1.10-alpha. diff --git a/src/common/address.c b/src/common/address.c index 30665fab27..e88869f1d8 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -1526,7 +1526,7 @@ parse_port_range(const char *port, uint16_t *port_min_out, } else if (endptr && *endptr == '-') { port = endptr+1; endptr = NULL; - port_max = (int)tor_parse_long(port, 10, 1, 65536, &ok, &endptr); + port_max = (int)tor_parse_long(port, 10, 1, 65535, &ok, &endptr); if (!ok) { log_warn(LD_GENERAL, "Malformed port %s on address range; rejecting.", |