[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] we were mangling memory because we weren"t allocing enough



Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	rendcommon.c 
Log Message:
we were mangling memory because we weren't allocing enough
for the hidserv desc
nick can you check that this is enough now?


Index: rendcommon.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/rendcommon.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- rendcommon.c	22 Jul 2005 00:14:58 -0000	1.52
+++ rendcommon.c	22 Jul 2005 00:18:25 -0000	1.53
@@ -53,7 +53,7 @@
   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;