[tor-commits] [tor/master] Assert that the directory server digest is given
nickm at torproject.org
nickm at torproject.org
Wed Dec 9 15:36:17 UTC 2015
commit c76059ec9bc8ac99096b253fc4af1119f26102eb
Author: cypherpunks <cypherpunks at torproject.org>
Date: Wed Dec 9 13:12:45 2015 +0100
Assert that the directory server digest is given
This prevents a possible crash when memory is copied from a pointer to
NULL.
---
src/or/routerlist.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 8145515..5e79064 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;
More information about the tor-commits
mailing list