diff options
author | rofl0r <retnyg@gmx.net> | 2017-11-27 19:12:12 +0000 |
---|---|---|
committer | rofl0r <rofl0r@users.noreply.github.com> | 2018-02-06 16:11:39 +0000 |
commit | 7a3fd81a8d3ce30ad8309b5897facde461e1f535 (patch) | |
tree | ef475d96f78f12042ab9a21ace975674a8df3eaf /src/reqs.c | |
parent | 8906b0734e5c61016d9d4090507f010b2006292d (diff) |
fix types used in SOCKS4/5 support code
the line
len = buff[0]; /* max = 255 */
could lead to a negative length if the value in buff[0] is > 127.
Diffstat (limited to 'src/reqs.c')
-rw-r--r-- | src/reqs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1270,8 +1270,8 @@ static void relay_connection (struct conn_s *connptr) static int connect_to_upstream_proxy(struct conn_s *connptr, struct request_s *request) { - int len; - char buff[512]; /* won't use more than 7 + 255 */ + unsigned len; + unsigned char buff[512]; /* won't use more than 7 + 255 */ unsigned short port; struct hostent *host; struct upstream *cur_upstream = connptr->upstream_proxy; |