diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-08-12 12:11:36 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-08-12 12:11:36 +0200 |
commit | 3398c9c65b124e90bc11da44cb7c26e2e0af7776 (patch) | |
tree | e47f335339761b9504d047bfa27cd1418e0c6ffc /src | |
parent | d80706b5f0e79e4439bb1c069bce2318c537c71c (diff) | |
download | weechat-3398c9c65b124e90bc11da44cb7c26e2e0af7776.zip |
irc: fix too small buffer for encoded base64 string used by SASL authentication
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/irc/irc-sasl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-sasl.c b/src/plugins/irc/irc-sasl.c index e85505982..e54013945 100644 --- a/src/plugins/irc/irc-sasl.c +++ b/src/plugins/irc/irc-sasl.c @@ -63,7 +63,7 @@ irc_sasl_mechanism_plain (const char *sasl_username, const char *sasl_password) string[length_username] = '\0'; string[(length_username * 2) + 1] = '\0'; - answer_base64 = malloc (length * 2); + answer_base64 = malloc (length * 4); if (answer_base64) weechat_string_encode_base64 (string, length - 1, answer_base64); @@ -208,7 +208,7 @@ irc_sasl_mechanism_dh_blowfish (const char *data_base64, memcpy (ptr_answer, password_crypted, length_password); /* encode answer to base64 */ - answer_base64 = malloc (length_answer * 2); + answer_base64 = malloc (length_answer * 4); if (answer_base64) weechat_string_encode_base64 (answer, length_answer, answer_base64); |