From 47148a3e79ddafbc50fa6093c2dae31dd8c36fcc Mon Sep 17 00:00:00 2001 From: Stephen Bennett Date: Tue, 23 Feb 2010 22:35:58 +0000 Subject: [PATCH] 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. --- modules/m_cap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/m_cap.c b/modules/m_cap.c index 9fa94d3..94aebac 100644 --- a/modules/m_cap.c +++ b/modules/m_cap.c @@ -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));