소스 검색

we were mangling memory because we weren't allocing enough
for the hidserv desc
nick can you check that this is enough now?


svn:r4628

Roger Dingledine 20 년 전
부모
커밋
3333d27f41
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/or/rendcommon.c

+ 1 - 1
src/or/rendcommon.c

@@ -53,7 +53,7 @@ rend_encode_service_descriptor(rend_service_descriptor_t *desc,
   char *end;
   int i;
   size_t asn1len;
-  cp = *str_out = tor_malloc(PK_BYTES*2*(desc->n_intro_points+1)); /*Too long, but ok*/
+  cp = *str_out = tor_malloc(PK_BYTES*2*(desc->n_intro_points+2)); /*Too long, but ok*/
   end = cp + PK_BYTES*2*(desc->n_intro_points+1);
   if (version) {
     *(uint8_t*)cp = (uint8_t)0xff;