diff options
author | rl1987 <rl1987@users.noreply.github.com> | 2020-05-21 14:17:15 +0300 |
---|---|---|
committer | rl1987 <rl1987@users.noreply.github.com> | 2020-05-21 14:17:15 +0300 |
commit | a5d28bf88f839c21fbefde8391d777fd9610abd3 (patch) | |
tree | 0d136fa3df36dba4cfdd230c0cb1b1d98456a0bd /src/feature/dirauth | |
parent | ded99992b831bfff782a3b3c612297a4634d3d88 (diff) | |
download | tor-a5d28bf88f839c21fbefde8391d777fd9610abd3.tar.gz tor-a5d28bf88f839c21fbefde8391d777fd9610abd3.zip |
Check for NULL from tor_dup_ip()
Diffstat (limited to 'src/feature/dirauth')
-rw-r--r-- | src/feature/dirauth/dirvote.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c index 0a9ade1321..85a23a12f6 100644 --- a/src/feature/dirauth/dirvote.c +++ b/src/feature/dirauth/dirvote.c @@ -4501,6 +4501,11 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, hostname = tor_dup_ip(addr); } + if (!hostname) { + log_err(LD_BUG, "Failed to determine hostname AND duplicate address"); + return NULL; + } + if (d_options->VersioningAuthoritativeDirectory) { client_versions = format_recommended_version_list(d_options->RecommendedClientVersions, 0); |