diff options
author | teor <teor@torproject.org> | 2019-06-06 09:55:44 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-06-06 09:55:44 +1000 |
commit | c8c2e2b8fcc4d99adce600da8210a5e9ae653daf (patch) | |
tree | 6545bbb727d8aeb8cd394a623e6a2a5a387cdc4f /src/feature | |
parent | e5deb2bbc73d8830ae6c479a4532e72112f5484a (diff) | |
parent | dc8e3cd5ce2affb849ed07db8b4a7788769c5935 (diff) | |
download | tor-c8c2e2b8fcc4d99adce600da8210a5e9ae653daf.tar.gz tor-c8c2e2b8fcc4d99adce600da8210a5e9ae653daf.zip |
Merge branch 'bug30781_034' into bug30781_035
Moved fix from src/or/routerparse.c to src/feature/dirparse/routerparse.c.
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/dirparse/routerparse.c | 3 |
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; } |