소스 검색

Assert that the directory server digest is given

This prevents a possible crash when memory is copied from a pointer to
NULL.
cypherpunks 9 년 전
부모
커밋
c76059ec9b
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/or/routerlist.c

+ 2 - 0
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;