From bd64bba0e02c23c6443d9c2a41f68fb90a0c7e9c Mon Sep 17 00:00:00 2001 From: david Date: Tue, 6 Aug 2013 02:24:16 +0000 Subject: [PATCH] Fix an indexing error in Ncat datagram listen mode. --- ncat/ncat_listen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ncat/ncat_listen.c b/ncat/ncat_listen.c index 294da1b80..ed40ae16f 100644 --- a/ncat/ncat_listen.c +++ b/ncat/ncat_listen.c @@ -680,7 +680,7 @@ static int ncat_listen_dgram(int proto) /* Rebuild the udp socket which got burnt */ sockfd[fdn] = do_listen(SOCK_DGRAM, proto, &listenaddrs[fdn]); - if (sockfd[i] == -1) + if (sockfd[fdn] == -1) bye("do_listen: %s", socket_strerror(socket_errno())); FD_SET(sockfd[fdn], &listen_fds); add_fd(&listen_fdlist, sockfd[fdn]);