]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
forward port:
authorRoger Dingledine <arma@torproject.org>
Tue, 21 Dec 2004 02:57:25 +0000 (02:57 +0000)
committerRoger Dingledine <arma@torproject.org>
Tue, 21 Dec 2004 02:57:25 +0000 (02:57 +0000)
fix a fencepost: we were blowing away the \n when reporting confvalue items

svn:r3194

src/or/control.c

index 281a2ed6494f476ce2d5422dba3a64576c4ac72a..f3853513097ec6df84ecbe4e08ebbbaa135d25a1 100644 (file)
@@ -266,7 +266,7 @@ handle_control_getconf(connection_t *conn, uint16_t body_len, const char *body)
 
       while (answer) {
         struct config_line_t *next;
-        size_t alen = strlen(answer->key)+strlen(answer->value)+2;
+        size_t alen = strlen(answer->key)+strlen(answer->value)+3;
         char *astr = tor_malloc(alen);
         tor_snprintf(astr, alen, "%s %s\n", answer->key, answer->value);
         smartlist_add(answers, astr);