Fix dh-blowfish in sasl module and #230

Idea for the patch by psychon
This commit is contained in:
Alexey Sokolov
2012-09-19 08:38:09 +07:00
parent 48aa157024
commit 50e6c1bfab
+2 -2
View File
@@ -320,8 +320,8 @@ public:
DH_free(dh);
/* Add sasl username to response */
memcpy(out_ptr, GetNV("username").c_str(), GetNV("username").size());
out_ptr += GetNV("username").size() + 1;
memcpy(out_ptr, GetNV("username").c_str(), GetNV("username").length() + 1); // +1 for zero byte in the end
out_ptr += GetNV("username").length() + 1;
/* Finally add the encrypted password to the response */
memcpy(out_ptr, encrypted_password, password_length);