mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-01-06 21:02:55 +08:00
tunnel_to: shrink huge buffer size
the buffer buff was only used for the initial handshake packets, which in all supported protocols are usual less than a 100 bytes, with user/pass and dns name at maximum we'd require 768 bytes, which still leaves us a formidable 256 bytes for the rest of the packet. this fixes a segfault with microsocks which on musl uses tiny thread stack sizes of 8KB.
This commit is contained in:
parent
c99d97983e
commit
486f8200ad
@ -188,6 +188,7 @@ static int timed_connect(int sock, const struct sockaddr *addr, socklen_t len) {
|
||||
|
||||
|
||||
#define INVALID_INDEX 0xFFFFFFFFU
|
||||
#define BUFF_SIZE 1024 // used to read responses from proxies.
|
||||
static int tunnel_to(int sock, ip_type ip, unsigned short port, proxy_type pt, char *user, char *pass) {
|
||||
char *dns_name = NULL;
|
||||
char hostnamebuf[MSG_LEN_MAX];
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#ifndef __CORE_HEADER
|
||||
#define __CORE_HEADER
|
||||
#define BUFF_SIZE 8*1024 // used to read responses from proxies.
|
||||
#define MAX_LOCALNET 64
|
||||
#define MAX_DNAT 64
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user