diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-11-16 17:44:20 +0100 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-11-16 18:14:06 +0100 |
commit | 7bd46344df500439e0c90aaec23d8a61f055e7d9 (patch) | |
tree | f824dc503b8541f852d27ee65e7d0de8206c1440 /src | |
parent | 67650a869db43f90aa8aa4b7a605afa99ddbd557 (diff) | |
download | tor-7bd46344df500439e0c90aaec23d8a61f055e7d9.tar.gz tor-7bd46344df500439e0c90aaec23d8a61f055e7d9.zip |
Eat all whitespace after a control command
Diffstat (limited to 'src')
-rw-r--r-- | src/or/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c index 4d86a23759..109eb8857b 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1055,7 +1055,7 @@ handle_control_authenticate(control_connection_t *conn, uint32_t len, int bad_cookie=0, bad_password=0; smartlist_t *sl = NULL; - if (!len || TOR_ISSPACE(body[0])) { + if (!len) { password = tor_strdup(""); password_len = 0; } else if (TOR_ISXDIGIT(body[0])) { @@ -3118,7 +3118,7 @@ connection_control_process_inbuf(control_connection_t *conn) 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') { + while (TOR_ISSPACE(*args)) { ++args; --data_len; } |