diff options
author | George Kadianakis <desnacked@riseup.net> | 2012-12-17 14:39:24 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2013-02-09 16:30:16 +0000 |
commit | faf4f6c6d1da54b0a6b0c9946112f2e448867a8f (patch) | |
tree | 2133ca646b70e692ab704cf500e57d54af9b0d0a /src/or/connection.h | |
parent | 757b03aacbf7051194bbe9faa2bfcc59e4cc3392 (diff) | |
download | tor-faf4f6c6d1da54b0a6b0c9946112f2e448867a8f.tar.gz tor-faf4f6c6d1da54b0a6b0c9946112f2e448867a8f.zip |
Validate SOCKS arguments.
Diffstat (limited to 'src/or/connection.h')
-rw-r--r-- | src/or/connection.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/connection.h b/src/or/connection.h index c78fe6e652..3e656ec06e 100644 --- a/src/or/connection.h +++ b/src/or/connection.h @@ -89,6 +89,14 @@ int connection_connect(connection_t *conn, const char *address, const tor_addr_t *addr, uint16_t port, int *socket_error); +/** Maximum size of information that we can fit into SOCKS5 username + or password fields. */ +#define MAX_SOCKS5_AUTH_FIELD_SIZE 255 + +/** Total maximum size of information that we can fit into SOCKS5 + username and password fields. */ +#define MAX_SOCKS5_AUTH_SIZE_TOTAL 2*MAX_SOCKS5_AUTH_FIELD_SIZE + int connection_proxy_connect(connection_t *conn, int type); int connection_read_proxy_handshake(connection_t *conn); void log_failed_proxy_connection(connection_t *conn); |