1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 17:09:02 +00:00

Fix crash in Ncat UNIX socket datagram listen.

This commit is contained in:
dmiller
2018-03-22 16:31:31 +00:00
parent 72a68d8acd
commit 19ba6060db

View File

@@ -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++;