]> source.dussan.org Git - tigervnc.git/commitdiff
Handle no useful address types from getaddrinfo()
authorPierre Ossman <ossman@cendio.se>
Tue, 3 Mar 2015 15:03:32 +0000 (16:03 +0100)
committerPierre Ossman <ossman@cendio.se>
Tue, 3 Mar 2015 15:03:32 +0000 (16:03 +0100)
common/network/TcpSocket.cxx

index 5158e805dd333694c07079542eac83dddcfa9108..ef7f55db89162f197cb6cf85c3dd507a3e2813a8 100644 (file)
@@ -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)