diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-12-02 13:21:09 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-12-02 13:21:09 -0500 |
commit | 520182579a4c186e94a1ada1d66c09c89ee3f3c4 (patch) | |
tree | 299ba416c77a1d53dd5e83d07ee7349d7323668b /src | |
parent | 7ce8f5c621690899b49c87aa6aad158925a3f79a (diff) | |
parent | ee8f451bf1a8a0d01bb990ddf96f810a254394eb (diff) | |
download | tor-520182579a4c186e94a1ada1d66c09c89ee3f3c4.tar.gz tor-520182579a4c186e94a1ada1d66c09c89ee3f3c4.zip |
Merge remote branch 'origin/maint-0.2.2'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/control.c | 3 |
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; |