aboutsummaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-12-29 02:33:42 +0000
committerNick Mathewson <nickm@torproject.org>2007-12-29 02:33:42 +0000
commitbd32982c779261e0aae59499c0299c23c1d3f05b (patch)
tree097493ee32531eb99bca97483cc0bdfb7a0cf8fb /src/or/control.c
parentc03ef9c395cc6c3aab504a8f54db459015ca8a34 (diff)
downloadtor-bd32982c779261e0aae59499c0299c23c1d3f05b.tar.gz
tor-bd32982c779261e0aae59499c0299c23c1d3f05b.zip
r17426@catbus: nickm | 2007-12-28 21:12:29 -0500
Remove need for buf_pullup in fetch_line_from_buf(). svn:r13002
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/control.c b/src/or/control.c
index c91890cf6c..39deb8d266 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2631,10 +2631,11 @@ connection_control_process_inbuf(control_connection_t *conn)
/* Line not all here yet. Wait. */
return 0;
else if (r == -1) {
- while (conn->incoming_cmd_len < data_len+conn->incoming_cmd_cur_len)
- conn->incoming_cmd_len *= 2;
- conn->incoming_cmd = tor_realloc(conn->incoming_cmd,
- conn->incoming_cmd_len);
+ /*XXXX020 impose some maximum on length! */
+ while (conn->incoming_cmd_len < data_len+conn->incoming_cmd_cur_len)
+ conn->incoming_cmd_len *= 2;
+ conn->incoming_cmd = tor_realloc(conn->incoming_cmd,
+ conn->incoming_cmd_len);
}
} while (r != 1);