[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.2.3] Fix port range in parse_port_range().



commit 62c1311b3ab57c61488ecfc8c94fabb5f2c70e6e
Author: George Kadianakis <desnacked@xxxxxxxxxx>
Date:   Fri Jun 22 18:24:06 2012 +0300

    Fix port range in parse_port_range().
---
 changes/bug6218      |    3 +++
 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 0000000..5d5d108
--- /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 30665fa..e88869f 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.",



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits