]> jfr.im git - solanum.git/blobdiff - src/s_serv.c
Remove s_assert definition from ircd_defs.h and add it to its own header.
[solanum.git] / src / s_serv.c
index a6e8b43260e5a3baa7e0657d20041ba3dd3891a3..1efc7eb05f2620a9ab293548249e237f3be33c9c 100644 (file)
@@ -55,6 +55,7 @@
 #include "reject.h"
 #include "sslproc.h"
 #include "capability.h"
+#include "s_assert.h"
 
 #ifndef INADDR_NONE
 #define INADDR_NONE ((unsigned int) 0xffffffff)
@@ -326,6 +327,7 @@ check_server(const char *name, struct Client *client_p)
        struct server_conf *tmp_p;
        rb_dlink_node *ptr;
        int error = -1;
+       const char *encr;
 
        s_assert(NULL != client_p);
        if(client_p == NULL)
@@ -360,8 +362,9 @@ check_server(const char *name, struct Client *client_p)
                        {
                                if(ServerConfEncrypted(tmp_p))
                                {
-                                       if(!strcmp(tmp_p->passwd, rb_crypt(client_p->localClient->passwd,
-                                                                       tmp_p->passwd)))
+                                       encr = rb_crypt(client_p->localClient->passwd,
+                                                                       tmp_p->passwd);
+                                       if(encr != NULL && !strcmp(tmp_p->passwd, encr))
                                        {
                                                server_p = tmp_p;
                                                break;