mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 11:22:05 +00:00
Fix crash in Ncat UNIX socket datagram listen.
This commit is contained in:
parent
72a68d8acd
commit
19ba6060db
1 changed files with 7 additions and 1 deletions
|
|
@ -878,8 +878,14 @@ static int ncat_listen_dgram(int proto)
|
|||
ncat_log_recv(buf, nbytes);
|
||||
}
|
||||
|
||||
if (o.verbose)
|
||||
if (o.verbose) {
|
||||
#if HAVE_SYS_UN_H
|
||||
if (remotess.sockaddr.sa_family == AF_UNIX)
|
||||
loguser("Connection from %s.\n", remotess.un.sun_path);
|
||||
else
|
||||
#endif
|
||||
loguser("Connection from %s.\n", inet_socktop(&remotess));
|
||||
}
|
||||
|
||||
conn_inc++;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue