diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-05-22 23:24:06 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-05-22 23:24:06 +0000 |
commit | 55c38f88b9b568cb6cfcd77cac2dd580e80c6b91 (patch) | |
tree | 4a8e96ebc2a45cf086c59f122d9e1ca04c8d6107 | |
parent | a915e5d1f6faa309f453bd963f240f2b3a5c04cf (diff) | |
download | tor-55c38f88b9b568cb6cfcd77cac2dd580e80c6b91.tar.gz tor-55c38f88b9b568cb6cfcd77cac2dd580e80c6b91.zip |
Remove string size limit on NEWDESC messages; solve bug 291.
svn:r6463
-rw-r--r-- | src/or/control.c | 8 |
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)); |