aboutsummaryrefslogtreecommitdiff
path: root/src/feature/rend/rendservice.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-06 09:47:32 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-06 09:47:32 -0400
commit8815960c4615da0015e78c3256c3f611a30f6e6c (patch)
treee6659be5abd68f92d88684f7904ea775a5bcf5a3 /src/feature/rend/rendservice.c
parent6edee54afaaa60f34bed0dedb2792766f8683cd5 (diff)
parent326b510bae0b0d479dd924a233c6f6150737eb8b (diff)
downloadtor-8815960c4615da0015e78c3256c3f611a30f6e6c.tar.gz
tor-8815960c4615da0015e78c3256c3f611a30f6e6c.zip
Merge remote-tracking branch 'tor-github/pr/294'
Diffstat (limited to 'src/feature/rend/rendservice.c')
-rw-r--r--src/feature/rend/rendservice.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/feature/rend/rendservice.c b/src/feature/rend/rendservice.c
index 66a4fb5f4f..37e604d07d 100644
--- a/src/feature/rend/rendservice.c
+++ b/src/feature/rend/rendservice.c
@@ -451,11 +451,19 @@ rend_service_parse_port_config(const char *string, const char *sep,
int is_unix;
ret = port_cfg_line_extract_addrport(addrport_element, &addrport,
&is_unix, &rest);
+
if (ret < 0) {
tor_asprintf(&err_msg, "Couldn't process address <%s> from hidden "
"service configuration", addrport_element);
goto err;
}
+
+ if (rest && strlen(rest)) {
+ err_msg = tor_strdup("HiddenServicePort parse error: invalid port "
+ "mapping");
+ goto err;
+ }
+
if (is_unix) {
socket_path = addrport;
is_unix_addr = 1;