diff options
author | John Brooks <john.brooks@dereferenced.net> | 2015-05-16 19:50:18 -0600 |
---|---|---|
committer | John Brooks <john.brooks@dereferenced.net> | 2015-05-16 20:01:38 -0600 |
commit | 6f9e90101e64040bda38c34de884f3d996677ac9 (patch) | |
tree | c99f7ea9d79ae246d56312c60ddaf2ae7d836c9a /src | |
parent | 2aaaf7b145e818835e4e0d17e9aed14213b8b0ee (diff) | |
download | tor-6f9e90101e64040bda38c34de884f3d996677ac9.tar.gz tor-6f9e90101e64040bda38c34de884f3d996677ac9.zip |
Fix crash on HUP with mixed ephemeral services
Ephemeral services will be listed in rend_services_list at the end of
rend_config_services, so it must check whether directory is non-NULL
before comparing.
This crash happens when reloading config on a tor with mixed configured
and ephemeral services.
Fixes bug #16060. Bugfix on 0.2.7.1-alpha.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/rendservice.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index e170760ece..daca4ccda4 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -709,7 +709,8 @@ rend_config_services(const or_options_t *options, int validate_only) * probably ok? */ SMARTLIST_FOREACH_BEGIN(rend_service_list, rend_service_t *, new) { SMARTLIST_FOREACH_BEGIN(old_service_list, rend_service_t *, old) { - if (!strcmp(old->directory, new->directory)) { + if (new->directory && old->directory && + !strcmp(old->directory, new->directory)) { smartlist_add_all(new->intro_nodes, old->intro_nodes); smartlist_clear(old->intro_nodes); smartlist_add(surviving_services, old); |