mirror of
https://github.com/rofl0r/proxychains-ng
synced 2026-05-20 12:49:50 +08:00
shrink huge gethostbyname buffer
careful analysis has shown that the buffer is only ever used for at most a single hostname, so 256 bytes are sufficient. the huge 8KB buffer caused stack overflow when used with microsocks, which defaults to tiny thread stacks of 8KB with musl libc.
This commit is contained in:
+1
-1
@@ -117,7 +117,7 @@ struct gethostbyname_data {
|
||||
struct hostent hostent_space;
|
||||
in_addr_t resolved_addr;
|
||||
char *resolved_addr_p[2];
|
||||
char addr_name[1024 * 8];
|
||||
char addr_name[256];
|
||||
};
|
||||
|
||||
struct hostent* proxy_gethostbyname(const char *name, struct gethostbyname_data *data);
|
||||
|
||||
Reference in New Issue
Block a user