diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/irc/irc-sasl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-sasl.c b/src/plugins/irc/irc-sasl.c index 3795d3486..e96323e10 100644 --- a/src/plugins/irc/irc-sasl.c +++ b/src/plugins/irc/irc-sasl.c @@ -58,6 +58,9 @@ irc_sasl_mechanism_plain (const char *sasl_username, const char *sasl_password) char *answer_base64, *string; int length_username, length; + if (!sasl_username || !sasl_password) + return NULL; + answer_base64 = NULL; length_username = strlen (sasl_username); length = ((length_username + 1) * 2) + strlen (sasl_password) + 1; @@ -117,6 +120,12 @@ irc_sasl_mechanism_scram (struct t_irc_server *server, int server_key_size, server_signature_size, verifier_size; long number; + if (!server || !hash_algo || !data_base64 || !sasl_username + || !sasl_password) + { + return NULL; + } + answer_base64 = NULL; string = NULL; length = 0; |