[Commits] [SCM] claws branch, master, updated. 3.16.0-91-gf4cb298

wwp at claws-mail.org wwp at claws-mail.org
Sat Mar 17 19:34:55 CET 2018


The branch, master has been updated
       via  f4cb29891be3d0a74191064680ddade59344c076 (commit)
      from  2d03eb98268e11b12c698bb6f98c7fb2f3559e3b (commit)

Summary of changes:
 src/plugins/clamd/libclamd/clamd-plugin.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit f4cb29891be3d0a74191064680ddade59344c076
Author: wwp <wwp at free.fr>
Date:   Sat Mar 17 19:34:05 2018 +0100

    Fix wrong malloc of clamd_socket struct, CID 1220477.

diff --git a/src/plugins/clamd/libclamd/clamd-plugin.c b/src/plugins/clamd/libclamd/clamd-plugin.c
index 6f1cc59..23358e5 100644
--- a/src/plugins/clamd/libclamd/clamd-plugin.c
+++ b/src/plugins/clamd/libclamd/clamd-plugin.c
@@ -138,7 +138,7 @@ void clamd_create_config_automatic(const gchar* path) {
 					value = g_strdup(g_strchomp(tmp));
 				if (strcmp(clamd_tokens[0], token) == 0) {
 					/* UNIX socket */
-					Socket = (Clamd_Socket *) malloc(sizeof(Clamd_Socket *));
+					Socket = (Clamd_Socket *) malloc(sizeof(Clamd_Socket));
 					if (Socket) {
 						Socket->socket.host = NULL;
 						Socket->socket.port = -1;
@@ -154,7 +154,7 @@ void clamd_create_config_automatic(const gchar* path) {
 				else if (strcmp(clamd_tokens[1], token) == 0) {
 					/* INET socket */
 					if (! Socket) {
-						Socket = (Clamd_Socket *) malloc(sizeof(Clamd_Socket *));
+						Socket = (Clamd_Socket *) malloc(sizeof(Clamd_Socket));
 						if (Socket) {
 							Socket->socket.path = NULL;
 							Socket->socket.port = -1;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list