mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Assert that the directory server digest is given
This prevents a possible crash when memory is copied from a pointer to NULL.
This commit is contained in:
parent
fbdd32ebe9
commit
c76059ec9b
@ -4051,6 +4051,8 @@ dir_server_new(int is_authority,
|
||||
uint32_t a;
|
||||
char *hostname_ = NULL;
|
||||
|
||||
tor_assert(digest);
|
||||
|
||||
if (weight < 0)
|
||||
return NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user