diff --git a/CHANGELOG b/CHANGELOG index b2ba75988..3acff4b67 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ #Nmap Changelog ($Id$); -*-text-*- +o [Nsock][GH#2595] Fix an issue where Nsock's SOCKS4 proxy code would send + additional null bytes on Windows and other platforms where the compiler does + not understand __attribute__((packed)). [Daniel Miller] + o The --release-memory option is now a no-op. Nmap will always run finalization routines that release allocated memory before closing. diff --git a/nsock/src/proxy_socks4.c b/nsock/src/proxy_socks4.c index c567bc66a..9db30db47 100644 --- a/nsock/src/proxy_socks4.c +++ b/nsock/src/proxy_socks4.c @@ -64,6 +64,7 @@ extern const struct proxy_spec ProxySpecSocks4; +#pragma pack(push, 1) struct socks4_data { uint8_t version; uint8_t type; @@ -71,6 +72,7 @@ struct socks4_data { uint32_t address; uint8_t null; } __attribute__((packed)); +#pragma pack(pop) static int proxy_socks4_node_new(struct proxy_node **node, const struct uri *uri) {