diff --git a/CHANGELOG b/CHANGELOG index 7defc43d3..e3759bc4b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ #Nmap Changelog ($Id$); -*-text-*- +o [Ncat][GH#1560] Allow Ncat to connect to servers on port 0, provided that the + socket implementation allows this. [Daniel Miller] + o Update the included libpcap to 1.9.0. [Daniel Miller] o [NSE][GH#1544] Fix a logic error that resulted in scripts not honoring the diff --git a/ncat/ncat_main.c b/ncat/ncat_main.c index 088d7b070..0283a52f3 100644 --- a/ncat/ncat_main.c +++ b/ncat/ncat_main.c @@ -891,7 +891,7 @@ int main(int argc, char *argv[]) errno = 0; long_port = strtol(argv[optind], NULL, 10); - if (errno != 0 || long_port <= 0 || long_port > 65535) + if (errno != 0 || long_port < 0 || long_port > 65535) bye("Invalid port number \"%s\".", argv[optind]); o.portno = (unsigned short) long_port;