summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-12-02 13:21:09 -0500
committerNick Mathewson <nickm@torproject.org>2010-12-02 13:21:09 -0500
commit520182579a4c186e94a1ada1d66c09c89ee3f3c4 (patch)
tree299ba416c77a1d53dd5e83d07ee7349d7323668b /src
parent7ce8f5c621690899b49c87aa6aad158925a3f79a (diff)
parentee8f451bf1a8a0d01bb990ddf96f810a254394eb (diff)
downloadtor-520182579a4c186e94a1ada1d66c09c89ee3f3c4.tar.gz
tor-520182579a4c186e94a1ada1d66c09c89ee3f3c4.zip
Merge remote branch 'origin/maint-0.2.2'
Diffstat (limited to 'src')
-rw-r--r--src/or/control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/control.c b/src/or/control.c
index b1551d4e1d..5e2bcc702f 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2874,9 +2874,10 @@ connection_control_process_inbuf(control_connection_t *conn)
&& !TOR_ISSPACE(conn->incoming_cmd[cmd_len]))
++cmd_len;
- data_len -= cmd_len;
conn->incoming_cmd[cmd_len]='\0';
args = conn->incoming_cmd+cmd_len+1;
+ tor_assert(data_len>(size_t)cmd_len);
+ data_len -= (cmd_len+1); /* skip the command and NUL we added after it */
while (*args == ' ' || *args == '\t') {
++args;
--data_len;