Use FLAGS_SENTUSER instead of 'user' being non-empty to decide whether to register a user on CAP END.

identd and SASL can cause source_p->user to be present without USER having been sent.
Without this change, that could cause a crash later on as localClient->fullcaps is not initialised.
This commit is contained in:
Stephen Bennett 2010-02-23 22:35:58 +00:00
parent 45b9f1cbc0
commit 47148a3e79
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ cap_end(struct Client *source_p, const char *arg)
source_p->flags &= ~FLAGS_CLICAP;
if(source_p->name[0] && source_p->user)
if(source_p->name[0] && source_p->flags & FLAGS_SENTUSER)
{
char buf[USERLEN+1];
rb_strlcpy(buf, source_p->username, sizeof(buf));