[Commits] [SCM] claws branch, master, updated. 3.16.0-131-g33c0941

wwp at claws-mail.org wwp at claws-mail.org
Fri Apr 13 12:34:06 CEST 2018


The branch, master has been updated
       via  33c094132790240a142967d603cfa9ea4ceddfd1 (commit)
      from  6d71ef27da1e739fad65e44c2b6c27d60b41a6e5 (commit)

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


- Log -----------------------------------------------------------------
commit 33c094132790240a142967d603cfa9ea4ceddfd1
Author: wwp <wwp at free.fr>
Date:   Fri Apr 13 12:32:47 2018 +0200

    ClamAV plugin: manage read errors (fixes CID #1220483).

diff --git a/src/plugins/clamd/libclamd/clamd-plugin.c b/src/plugins/clamd/libclamd/clamd-plugin.c
index 963cbca..15122bb 100644
--- a/src/plugins/clamd/libclamd/clamd-plugin.c
+++ b/src/plugins/clamd/libclamd/clamd-plugin.c
@@ -556,6 +556,12 @@ Clamd_Stat clamd_verify_email(const gchar* path, response* result) {
 		if (n_read == 0) {
 			buf[n_read] = '\0';
 			debug_print("response: %s\n", buf);
+		} else {
+			/* in case read() fails */
+			debug_print("read error %d\n", errno);
+			result->msg = NULL;
+			close(sock);
+			return NO_CONNECTION;
 		}
 	}
 	if (strstr(buf, "ERROR")) {

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list