Commit f88efb18 authored by Niels Möller's avatar Niels Möller
Browse files

(do_read_socks): Fixed bugs in parsing of client's

first message.

Rev: src/socks.c:1.3
parent 2d4d380d
......@@ -352,11 +352,6 @@ do_read_socks(struct read_handler **h,
werror("Socks connection of unknown version %i.\n", p[0]);
socks_fail(self->socks);
}
else if (p[1] != 0)
{
werror("Socks protocol error.\n");
socks_fail(self->socks);
}
else
{
self->socks->version = p[0];
......@@ -369,7 +364,7 @@ do_read_socks(struct read_handler **h,
case SOCKS_VERSION_METHODS:
/* We support only method 0 */
if (memcmp(p+2, SOCKS_NOAUTH, p[1]))
if (memchr(p+2, SOCKS_NOAUTH, p[1]))
{
socks_method(self->socks, SOCKS_NOAUTH);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment