From c0769397d5eb6bb0c4f9e77ec0cc34df9502bb44 Mon Sep 17 00:00:00 2001 From: TingPing Date: Sat, 22 Nov 2014 20:56:15 -0500 Subject: [PATCH] Fix possible crash in SASL Blowfish mech --- src/common/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;