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:
@@ -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++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user