mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Check for the linked list returned by getaddrinfo being NULL as well as a
non-zero return code in TargetGroup.cc. Apparently on Windows XP SP3 at least getaddrinfo can return success but give you an empty list.
This commit is contained in:
parent
fa034c1ac9
commit
24042b3362
1 changed files with 1 additions and 1 deletions
|
|
@ -299,7 +299,7 @@ int TargetGroup::parse_expr(const char * const target_expr, int af) {
|
|||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = PF_INET6;
|
||||
rc = getaddrinfo(hostexp, NULL, &hints, &result);
|
||||
if (rc != 0) {
|
||||
if (rc != 0 || result == NULL) {
|
||||
error("Failed to resolve given IPv6 hostname/IP: %s. Note that you can't use '/mask' or '[1-4,7,100-]' style ranges for IPv6. Error code %d: %s", hostexp, rc, gai_strerror(rc));
|
||||
free(hostexp);
|
||||
if (result) freeaddrinfo(result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue