diff options
author | cypherpunks <cypherpunks@torproject.org> | 2015-12-09 13:12:45 +0100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-12-09 10:22:26 -0500 |
commit | c76059ec9bc8ac99096b253fc4af1119f26102eb (patch) | |
tree | dd55fe946180e04cf0c2c43b4a4759f3205be50f /src/or/routerlist.c | |
parent | fbdd32ebe9021d34dbe314a9cb24480ff3a9c9b1 (diff) | |
download | tor-c76059ec9bc8ac99096b253fc4af1119f26102eb.tar.gz tor-c76059ec9bc8ac99096b253fc4af1119f26102eb.zip |
Assert that the directory server digest is given
This prevents a possible crash when memory is copied from a pointer to
NULL.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 814551521e..5e7906475f 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -4051,6 +4051,8 @@ dir_server_new(int is_authority, uint32_t a; char *hostname_ = NULL; + tor_assert(digest); + if (weight < 0) return NULL; |