aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-10-12 19:01:53 +0000
committerNick Mathewson <nickm@torproject.org>2004-10-12 19:01:53 +0000
commite7241044e8f582a61c63d462fbbd1e3b593505ce (patch)
treed060900a7b1d6eb96fc5da0d4b825adb711b1a7a /src/common
parente8748b3fa0973fdd46b60d2b5a1b38d035de1643 (diff)
downloadtor-e7241044e8f582a61c63d462fbbd1e3b593505ce.tar
tor-e7241044e8f582a61c63d462fbbd1e3b593505ce.tar.gz
Better bounds checking on parsed ints
svn:r2450
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 5065e9721..6ff45a1ce 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -2052,7 +2052,7 @@ parse_addr_port(const char *addrport, char **address, uint32_t *addr,
if (colon) {
_address = tor_strndup(addrport, colon-addrport);
_port = atoi(colon+1);
- if (_port<1 || _port>65536) {
+ if (_port<1 || _port>65535) {
log_fn(LOG_WARN, "Port '%s' out of range", colon+1);
_port = 0;
ok = 0;