Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rofl0r/proxychains-ng.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2011-11-07 03:09:46 +0400
committerrofl0r <retnyg@gmx.net>2011-11-07 03:09:46 +0400
commit08d6feace80ef0b83bc9ce6c7d933ad00c6f0dae (patch)
treeb6cb5e9f027ea8c66128d4adef36f8a1015fcbf2
parenta6d778a0f11947ebe0e4673b043c4af892833ea5 (diff)
fix SOCKSv4a
-rw-r--r--src/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core.c b/src/core.c
index e7fe50c..423fe93 100644
--- a/src/core.c
+++ b/src/core.c
@@ -342,7 +342,10 @@ static int tunnel_to(int sock, ip_type ip, unsigned short port, proxy_type pt,ch
memcpy(&buff[4], &ip, 4); // dest host
len = ulen + 1; // username
if(len > 1)
- memcpy(&buff[8], user, ulen + 1);
+ memcpy(&buff[8], user, len);
+ else {
+ buff[8] = 0;
+ }
// do socksv4a dns resolution on the server
if(dns_len) {