From: Pierre Ossman Date: Tue, 3 Mar 2015 15:03:32 +0000 (+0100) Subject: Handle no useful address types from getaddrinfo() X-Git-Tag: v1.4.90~33^2~30 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=da9a38d4e9ded0901db1bd4b6144f0213ebecea7;p=tigervnc.git Handle no useful address types from getaddrinfo() --- diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx index 5158e805..ef7f55db 100644 --- a/common/network/TcpSocket.cxx +++ b/common/network/TcpSocket.cxx @@ -234,6 +234,9 @@ TcpSocket::TcpSocket(const char *host, int port) } freeaddrinfo(ai); + + if (current == NULL) + throw Exception("No useful address for host"); #endif /* HAVE_GETADDRINFO */ if (result == -1)