[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Backport running-routers buffer length bug fix
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv21653/src/or
Modified Files:
Tag: tor-0_0_9-patches
dirserv.c
Log Message:
Backport running-routers buffer length bug fix
Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.129
retrieving revision 1.129.2.1
diff -u -d -r1.129 -r1.129.2.1
--- dirserv.c 13 Dec 2004 00:44:38 -0000 1.129
+++ dirserv.c 24 Dec 2004 01:42:40 -0000 1.129.2.1
@@ -834,8 +834,6 @@
time_t published_on;
char *identity_pkey; /* Identity key, DER64-encoded. */
- len = 1024+(MAX_HEX_NICKNAME_LEN+2)*smartlist_len(descriptor_list);
- s = tor_malloc_zero(len);
if (list_server_status(NULL, &router_status)) {
goto err;
}
@@ -859,6 +857,9 @@
#endif
published_on = time(NULL);
format_iso_time(published, published_on);
+
+ len = 2048+strlen(router_status);
+ s = tor_malloc_zero(len);
tor_snprintf(s, len, "network-status\n"
"published %s\n"
"router-status %s\n"