Skip to content
Snippets Groups Projects
Commit 52018257 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Merge remote branch 'origin/maint-0.2.2'

parents 7ce8f5c6 ee8f451b
No related branches found
No related tags found
No related merge requests found
o Minor bugfixes
- Fix a off-by-one error in calculating some controller command argument
lengths. Fortunately, this is harmless, the controller code does
redundant NUL termination too. Found by boboper. Bugfix on
0.1.1.1-alpha.
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment