diff options
| author | 2009-10-03 04:08:20 +0000 | |
|---|---|---|
| committer | 2009-10-03 04:08:20 +0000 | |
| commit | 8ed74be517990d100bdfe237a002d5115ea85a5e (patch) | |
| tree | b9d50cac1077d59fb06cc9b164572573ad393e7a /src/socket.cpp | |
| parent | Get rid of a bunch of memory-wasting C-style strings (diff) | |
Fix crash due to null address in DNS
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11797 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socket.cpp')
| -rw-r--r-- | src/socket.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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. |
