From 8ed74be517990d100bdfe237a002d5115ea85a5e Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 3 Oct 2009 04:08:20 +0000 Subject: Fix crash due to null address in DNS git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11797 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socket.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/socket.cpp') diff --git a/src/socket.cpp b/src/socket.cpp index 00be4250b..9ec6c9982 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -27,10 +27,7 @@ bool InspIRCd::BindSocket(int sockfd, int port, const char* addr, bool dolisten) sockaddrs servaddr; int ret; - if (*addr == '*' || *addr == '\0') - addr = NULL; - - if (port == -1 && !addr) + if ((*addr == '*' || *addr == '\0') && port == -1) { /* Port -1: Means UDP IPV4 port binding - Special case * used by DNS engine. -- cgit v1.2.3