1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Set sa_len of IPv4 to sizeof(sockaddr_in), not sizeof(sockaddr_storage).

This commit is contained in:
david
2013-01-26 05:31:32 +00:00
parent 94fd369de7
commit 010969b77f

View File

@@ -300,7 +300,7 @@ bool NetBlockIPv4Ranges::next(struct sockaddr_storage *ss) {
sin->sin_family = AF_INET;
sin->sin_port = 0;
#if HAVE_SOCKADDR_SA_LEN
sin->sin_len = sizeof(*ss);
sin->sin_len = sizeof(*sin);
#endif
sin->sin_addr.s_addr = htonl((this->counter[0] << 24) | (this->counter[1] << 16) | (this->counter[2] << 8) | this->counter[3]);