summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-11-22 20:56:15 -0500
committerTingPing <tingping@tingping.se>2014-11-22 20:56:15 -0500
commitc0769397d5eb6bb0c4f9e77ec0cc34df9502bb44 (patch)
tree30ad113112db7c0757e966f199cafa2df29146b1
parentc9b63f7f9be01692b03fa15275135a4910a7e02d (diff)
Fix possible crash in SASL Blowfish mech
-rw-r--r--src/common/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c
index a6c4fad8..bfcc28a9 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1671,7 +1671,7 @@ encode_sasl_pass_blowfish (char *user, char *pass, char *data)
 	memset (encrypted_pass, 0, pass_len);
 	plain_pass = (char*)malloc (pass_len);
 	memset (plain_pass, 0, pass_len);
-	memcpy (plain_pass, pass, pass_len);
+	memcpy (plain_pass, pass, strlen(pass));
 	out_ptr = (char*)encrypted_pass;
 	in_ptr = (char*)plain_pass;