mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 12:41:29 +00:00
Set sa_len of IPv4 to sizeof(sockaddr_in), not sizeof(sockaddr_storage).
This commit is contained in:
@@ -300,7 +300,7 @@ bool NetBlockIPv4Ranges::next(struct sockaddr_storage *ss) {
|
|||||||
sin->sin_family = AF_INET;
|
sin->sin_family = AF_INET;
|
||||||
sin->sin_port = 0;
|
sin->sin_port = 0;
|
||||||
#if HAVE_SOCKADDR_SA_LEN
|
#if HAVE_SOCKADDR_SA_LEN
|
||||||
sin->sin_len = sizeof(*ss);
|
sin->sin_len = sizeof(*sin);
|
||||||
#endif
|
#endif
|
||||||
sin->sin_addr.s_addr = htonl((this->counter[0] << 24) | (this->counter[1] << 16) | (this->counter[2] << 8) | this->counter[3]);
|
sin->sin_addr.s_addr = htonl((this->counter[0] << 24) | (this->counter[1] << 16) | (this->counter[2] << 8) | this->counter[3]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user