diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-06-11 08:41:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-06-11 08:41:48 -0400 |
commit | 29842f68e7a4f38d69509191fba9a7ffb28cdcd8 (patch) | |
tree | a98823441f9358fcdd112094cc5c18f7f8e290ab /src | |
parent | eab9dc06af32ceb3826d068cf5bc55db68ad6c61 (diff) | |
parent | b07b1a4f6d1aae3755db7ccfa9e7417214375f13 (diff) | |
download | tor-29842f68e7a4f38d69509191fba9a7ffb28cdcd8.tar.gz tor-29842f68e7a4f38d69509191fba9a7ffb28cdcd8.zip |
Merge remote-tracking branch 'tor-github/pr/1082' into maint-0.4.1
Diffstat (limited to 'src')
-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 ff7e15f1f2..f78c46f186 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; } |