projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 2:
a4b3b84
)
Merge branch 'master' of ssh+git://git.claws-mail.org/home/git/claws
author
Michael Rasmussen
<mir@datanom.net>
Mon, 27 Nov 2017 21:51:59 +0000
(22:51 +0100)
committer
Michael Rasmussen
<mir@datanom.net>
Mon, 27 Nov 2017 21:51:59 +0000
(22:51 +0100)
src/plugins/clamd/libclamd/clamd-plugin.c
patch
|
blob
|
history
diff --git
a/src/plugins/clamd/libclamd/clamd-plugin.c
b/src/plugins/clamd/libclamd/clamd-plugin.c
index c72de83cc60e2a99f5aa123a04dfb942ac66e5c3..6f1cc59e5aecfff3ddf0effbcb0021f596f21ef5 100644
(file)
--- 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);