]> arthur.barton.de Git - ngircd.git/blobdiff - src/ngircd/resolve.c
security: fix remotely triggerable crash in SSL/TLS code
[ngircd.git] / src / ngircd / resolve.c
index 1eb35dd84e55156c30cd29b9a72f097f18c9e10a..e7f73ad5c3c32cf801ce891c15fa1a45689fcad5 100644 (file)
@@ -14,8 +14,6 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: resolve.c,v 1.29 2008/02/26 22:04:17 fw Exp $";
-
 #include "imp.h"
 #include <assert.h>
 #include <errno.h>
@@ -92,7 +90,7 @@ Resolve_Addr(RES_STAT * s, const ng_ipaddr_t *Addr, int identsock,
 
        pid = Resolver_fork(pipefd);
        if (pid > 0) {
-               Log(LOG_DEBUG, "Resolver for %s created (PID %d).", ng_ipaddr_tostr(Addr), pid);
+               LogDebug("Resolver for %s created (PID %d).", ng_ipaddr_tostr(Addr), pid);
 
                s->pid = pid;
                s->resolver_fd = pipefd[0];
@@ -175,13 +173,12 @@ Do_IdentQuery(int identsock, array *resolved_addr)
 #ifdef IDENTAUTH
        char *res;
 
-       assert(identsock >= 0);
+       if (identsock < 0)
+               return;
 
 #ifdef DEBUG
        Log_Resolver(LOG_DEBUG, "Doing IDENT lookup on socket %d ...", identsock);
 #endif
-       if (identsock < 0)
-               return;
        res = ident_id( identsock, 10 );
 #ifdef DEBUG
        Log_Resolver(LOG_DEBUG, "Ok, IDENT lookup on socket %d done: \"%s\"",