summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2010-08-04 21:48:40 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2010-08-04 21:48:40 -0400
commit9da927889f4eb621a912cb7775baa6e23e0af33a (patch)
tree4c1c88c254ca171ecfcbd63e8dcd4777b41f237c /modules
parent8703afe116701b6af3eba454eed51e92ac9afb6a (diff)
Fix enc_md5 to work with the way the new b64_encode does things with Anope::string, by making sure that the string is null terminated properly.
Diffstat (limited to 'modules')
-rw-r--r--modules/core/enc_md5.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/core/enc_md5.cpp b/modules/core/enc_md5.cpp
index 28927af33..fefcb6ce0 100644
--- a/modules/core/enc_md5.cpp
+++ b/modules/core/enc_md5.cpp
@@ -170,7 +170,7 @@ void MD5Update(MD5_CTX *context, const unsigned char *input, unsigned inputLen)
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
* the message digest and zeroizing the context.
*/
-void MD5Final(unsigned char digest[16], MD5_CTX *context)
+void MD5Final(unsigned char digest[17], MD5_CTX *context)
{
unsigned char bits[8];
unsigned index, padLen;
@@ -328,7 +328,7 @@ class EMD5 : public Module
EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest)
{
MD5_CTX context;
- unsigned char digest[16] = "";
+ unsigned char digest[17] = "";
Anope::string buf = "md5:";
Anope::string cpass;