summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-05-22 23:24:06 +0000
committerNick Mathewson <nickm@torproject.org>2006-05-22 23:24:06 +0000
commit55c38f88b9b568cb6cfcd77cac2dd580e80c6b91 (patch)
tree4a8e96ebc2a45cf086c59f122d9e1ca04c8d6107
parenta915e5d1f6faa309f453bd963f240f2b3a5c04cf (diff)
downloadtor-55c38f88b9b568cb6cfcd77cac2dd580e80c6b91.tar.gz
tor-55c38f88b9b568cb6cfcd77cac2dd580e80c6b91.zip
Remove string size limit on NEWDESC messages; solve bug 291.
svn:r6463
-rw-r--r--src/or/control.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 7dcdf99910..7413d34303 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2852,8 +2852,12 @@ control_event_descriptors_changed(smartlist_t *routers)
tor_free(msg);
}
if (EVENT_IS_INTERESTING1(EVENT_NEW_DESC)) {
- msg = smartlist_join_strings(identities, " ", 0, &len);
- send_control1_event(EVENT_NEW_DESC, "650 NEWDESC %s\r\n", msg);
+ char *ids = smartlist_join_strings(identities, " ", 0, &len);
+ size_t len = strlen(ids)+32;
+ msg = tor_malloc(len);
+ tor_snprintf(msg, len, "650 NEWDESC %s\r\n", ids);
+ send_control1_event_string(EVENT_NEW_DESC, msg);
+ tor_free(ids);
tor_free(msg);
}
SMARTLIST_FOREACH(identities, char *, cp, tor_free(cp));