diff options
author | teor <teor@torproject.org> | 2019-06-06 09:56:50 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-06-06 09:56:50 +1000 |
commit | fb3f461406d9d22da3ce0b602409c6610b8bb4f7 (patch) | |
tree | 86fde3f8dd233be419ba0aed06c7ae5c8d6eb723 /src/feature/dirparse/routerparse.c | |
parent | 6a6f7eb6718f22da80596a35e7774b075a417e97 (diff) | |
parent | c8c2e2b8fcc4d99adce600da8210a5e9ae653daf (diff) | |
download | tor-fb3f461406d9d22da3ce0b602409c6610b8bb4f7.tar.gz tor-fb3f461406d9d22da3ce0b602409c6610b8bb4f7.zip |
Merge branch 'bug30781_035' into bug30781_040
Diffstat (limited to 'src/feature/dirparse/routerparse.c')
-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; } |