[Commits] [SCM] claws branch, master, updated. 3.15.0-71-g755c0b5

ticho at claws-mail.org ticho at claws-mail.org
Wed Jun 21 16:22:53 CEST 2017


The branch, master has been updated
       via  755c0b590030b69c3e42244a3c46b6936d6ae999 (commit)
      from  7b573007cd8be18dc7ce792cd3f03f6201592743 (commit)

Summary of changes:
 src/password.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit 755c0b590030b69c3e42244a3c46b6936d6ae999
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Wed Jun 21 16:20:20 2017 +0200

    Improve password_decrypt_gnutls() to handle encrypted strings of any length.

diff --git a/src/password.c b/src/password.c
index 002ca29..08da488 100644
--- a/src/password.c
+++ b/src/password.c
@@ -481,10 +481,10 @@ gchar *password_decrypt_gnutls(const gchar *password,
 		return NULL;
 	}
 
-	buf = malloc(BUFSIZE + blocklen);
-	memset(buf, 0, BUFSIZE + blocklen);
+	buf = malloc(len + blocklen);
+	memset(buf, 0, len + blocklen);
 	ret = gnutls_cipher_decrypt2(handle, tmp, len,
-			buf, BUFSIZE + blocklen);
+			buf, len + blocklen);
 	if (ret < 0) {
 		debug_print("Decryption failed: %s\n", gnutls_strerror(ret));
 		g_free(key.data);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list