diff options
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 06014df53..f14b31557 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -161,6 +161,10 @@ static rend_service_port_config_t *parse_port_config(const char *string) log_fn(LOG_WARN, "Unparseable of missing port in hidden service port configuration."); return NULL; } + if (realport < 1 || realport > 65535) { + log_fn(LOG_WARN, "Port out of range"); + return NULL; + } addr = 0x7F000001u; /* Default to 127.0.0.1 */ } |