mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 21:21:31 +00:00
Because in_addr is stored in network byte order, this function could extract the octets in MSB-to-LSB order or in LSB-to-MSB order. This didn't matter in the case of resolved names, because the same order was used when generating the octet array and later when matching against it. But the function parse_ipv4_ranges, which handles literal IPv4 addresses, always uses octet[0] as the MSB, so comparisons failed in later matching. As it was, the code worked on little-endian architectures but didn't on big-endian.