summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-08-09 14:05:26 +1000
committerteor <teor@torproject.org>2019-08-09 14:05:26 +1000
commit654769bcec3e98bea5e3ac48b2aabffcbe55375e (patch)
tree66f00df458b0b5f5d4fbd7dd3c9bb3ef6b6dafc2 /src
parent1ba2bd3599e94bb2fa533cde9e1ef296b4124ce4 (diff)
parentc8c2e2b8fcc4d99adce600da8210a5e9ae653daf (diff)
downloadtor-654769bcec3e98bea5e3ac48b2aabffcbe55375e.tar.gz
tor-654769bcec3e98bea5e3ac48b2aabffcbe55375e.zip
Merge remote-tracking branch 'tor-github/pr/1080' into maint-0.3.5
Diffstat (limited to 'src')
-rw-r--r--src/feature/dirparse/routerparse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/feature/dirparse/routerparse.c b/src/feature/dirparse/routerparse.c
index a819302631..e44fbf77f9 100644
--- a/src/feature/dirparse/routerparse.c
+++ b/src/feature/dirparse/routerparse.c
@@ -556,6 +556,9 @@ router_parse_entry_from_string(const char *s, const char *end,
if ((tok = find_opt_by_keyword(tokens, A_PURPOSE))) {
tor_assert(tok->n_args);
router->purpose = router_purpose_from_string(tok->args[0]);
+ if (router->purpose == ROUTER_PURPOSE_UNKNOWN) {
+ goto err;
+ }
} else {
router->purpose = ROUTER_PURPOSE_GENERAL;
}