[Commits] [SCM] claws branch, master, updated. 3.12.0-121-gbaca916

miras at claws-mail.org miras at claws-mail.org
Fri Oct 9 19:07:26 CEST 2015


The branch, master has been updated
       via  baca916ae21c7a7a7d382262c8669f7aea6dc226 (commit)
       via  5bc11591f13b40bccd9e35ee23a5255cfa44bce0 (commit)
      from  bfe4e5c5b3c90a95005bd091ca4c5e6265cac955 (commit)

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


- Log -----------------------------------------------------------------
commit baca916ae21c7a7a7d382262c8669f7aea6dc226
Merge: 5bc1159 bfe4e5c
Author: Michael Rasmussen <mir at datanom.net>
Date:   Fri Oct 9 19:07:14 2015 +0200

    Merge branch 'master' of ssh+git://git.claws-mail.org/home/git/claws


commit 5bc11591f13b40bccd9e35ee23a5255cfa44bce0
Author: Michael Rasmussen <mir at datanom.net>
Date:   Fri Oct 9 19:06:57 2015 +0200

    Fix buffer overrun

diff --git a/src/plugins/clamd/libclamd/clamd-plugin.c b/src/plugins/clamd/libclamd/clamd-plugin.c
index 5f58cfa..dd61481 100644
--- a/src/plugins/clamd/libclamd/clamd-plugin.c
+++ b/src/plugins/clamd/libclamd/clamd-plugin.c
@@ -369,6 +369,7 @@ Clamd_Stat clamd_init(Clamd_Socket* config) {
 	}
 	memset(buf, '\0', sizeof(buf));
 	while ((n_read = read(sock, buf, BUFSIZ)) > 0) {
+		n_read = n_read < BUFSIZ ? n_read : BUFSIZ - 1;
 		buf[n_read] = '\0';
 		if (buf[strlen(buf) - 1] == '\n')
 			buf[strlen(buf) - 1] = '\0';
@@ -526,6 +527,7 @@ Clamd_Stat clamd_verify_email(const gchar* path, response* result) {
 		g_free(command);
 		memset(buf, '\0', sizeof(buf));
 		while ((n_read = read(sock, buf, BUFSIZ)) > 0) {
+			n_read = n_read < BUFSIZ ? n_read : BUFSIZ - 1;
 			buf[n_read] = '\0';
 			if (buf[strlen(buf) - 1] == '\n')
 				buf[strlen(buf) - 1] = '\0';

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list