From: Michael Rasmussen Date: Sat, 26 Aug 2017 21:56:30 +0000 (+0200) Subject: Merge branch 'master' of ssh+git://git.claws-mail.org/home/git/claws X-Git-Tag: 3.17.0~219 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=7ee8518c9e2538f4c857e4d94dfcb2718edde48c;hp=404c674753092fe8e06f0a27da7405b30c646058 Merge branch 'master' of ssh+git://git.claws-mail.org/home/git/claws --- diff --git a/src/plugins/clamd/libclamd/clamd-plugin.c b/src/plugins/clamd/libclamd/clamd-plugin.c index c72de83cc..6f1cc59e5 100644 --- a/src/plugins/clamd/libclamd/clamd-plugin.c +++ b/src/plugins/clamd/libclamd/clamd-plugin.c @@ -324,6 +324,10 @@ static int create_socket() { addr_i.sin_family = AF_INET; addr_i.sin_port = htons(Socket->socket.port); hp = gethostbyname(Socket->socket.host); + if (!hp) { + g_error("fail to get host by: %s", Socket->socket.host); + return new_sock; + } debug_print("IP socket host: %s:%d\n", Socket->socket.host, Socket->socket.port); bcopy((void *)hp->h_addr, (void *)&addr_i.sin_addr, hp->h_length);