1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-01 23:06:38 +02:00

Fix crash if SASL is enabled and ping-cookie is disabled (neither are the

default). Reported by fbi (#4307).
This commit is contained in:
Bram Matthys
2014-05-30 11:32:18 +02:00
parent 184d63094b
commit d2db300fe8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1023,7 +1023,7 @@ DLLFUNC CMD_FUNC(m_nick)
}
/* This had to be copied here to avoid problems.. */
(void)strcpy(sptr->name, nick);
if (sptr->user && IsNotSpoof(sptr) && !CHECKPROTO(sptr, PROTO_CLICAP))
if (sptr->user && *sptr->user->username && IsNotSpoof(sptr) && !CHECKPROTO(sptr, PROTO_CLICAP))
{
/*
** USER already received, now we have NICK.
+1 -1
View File
@@ -164,7 +164,7 @@ Debug((DEBUG_NOTICE, "NOSPOOF"));
sendto_one(sptr, ":IRC!IRC@%s PRIVMSG %s :\1VERSION\1",
me.name, sptr->name);
if (sptr->user && sptr->name[0] && !CHECKPROTO(sptr, PROTO_CLICAP))
if (sptr->user && *sptr->user->username && sptr->name[0] && !CHECKPROTO(sptr, PROTO_CLICAP))
return register_user(cptr, sptr, sptr->name,
sptr->user->username, NULL, NULL, NULL);
return 0;