[vlc-commits] SOCKSv5: fix inverted logic (fixes #10247)
Rémi Denis-Courmont
git at videolan.org
Sat Dec 28 12:44:27 CET 2013
vlc/vlc-2.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Dec 28 13:03:53 2013 +0200| [fe283d0ec4e244475a8595fda342fd1ec9691a57] | committer: Rémi Denis-Courmont
SOCKSv5: fix inverted logic (fixes #10247)
(cherry picked from commit dcfe8660d41dbb2b519949ff767c7088a969525a)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=fe283d0ec4e244475a8595fda342fd1ec9691a57
---
src/network/tcp.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/network/tcp.c b/src/network/tcp.c
index 8c294e7..4a3ef17 100644
--- a/src/network/tcp.c
+++ b/src/network/tcp.c
@@ -349,17 +349,14 @@ static int SocksNegotiate( vlc_object_t *p_obj,
return VLC_SUCCESS;
/* We negotiate authentication */
-
- if( ( psz_socks_user == NULL ) && ( psz_socks_passwd == NULL ) )
- b_auth = true;
-
buffer[0] = i_socks_version; /* SOCKS version */
- if( b_auth )
+ if( psz_socks_user != NULL && psz_socks_passwd != NULL )
{
buffer[1] = 2; /* Number of methods */
buffer[2] = 0x00; /* - No auth required */
buffer[3] = 0x02; /* - USer/Password */
i_len = 4;
+ b_auth = true;
}
else
{
More information about the vlc-commits
mailing list