projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b57300
)
Improve password_decrypt_gnutls() to handle encrypted strings of any length.
author
Andrej Kacian
<ticho@claws-mail.org>
Wed, 21 Jun 2017 14:20:20 +0000
(16:20 +0200)
committer
Andrej Kacian
<ticho@claws-mail.org>
Wed, 21 Jun 2017 14:20:20 +0000
(16:20 +0200)
src/password.c
patch
|
blob
|
history
diff --git
a/src/password.c
b/src/password.c
index 002ca2943f2595c4c42741eedc9ebff732df9fc3..08da4880f72cb17bedba83bed55d5252f584c179 100644
(file)
--- 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);