diff options
author | TingPing <tingping@tingping.se> | 2014-11-22 20:56:15 -0500 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2014-11-22 20:56:15 -0500 |
commit | c0769397d5eb6bb0c4f9e77ec0cc34df9502bb44 (patch) | |
tree | 30ad113112db7c0757e966f199cafa2df29146b1 /src/common | |
parent | c9b63f7f9be01692b03fa15275135a4910a7e02d (diff) |
Fix possible crash in SASL Blowfish mech
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/util.c | 2 |
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; |