ircd: attach_conf: avoid clang static analysis warning
In the impossible scenario where ClassPtr(aconf) is NULL, reject the client instead of dereferencing the NULL pointer.
This commit is contained in:
parent
b5ad4cdfde
commit
86432f8f86
1 changed files with 5 additions and 5 deletions
|
@ -590,11 +590,11 @@ attach_conf(struct Client *client_p, struct ConfItem *aconf)
|
||||||
if(IsIllegal(aconf))
|
if(IsIllegal(aconf))
|
||||||
return (NOT_AUTHORISED);
|
return (NOT_AUTHORISED);
|
||||||
|
|
||||||
if(ClassPtr(aconf))
|
if(s_assert(ClassPtr(aconf)))
|
||||||
{
|
return (NOT_AUTHORISED);
|
||||||
|
|
||||||
if(!add_ip_limit(client_p, aconf))
|
if(!add_ip_limit(client_p, aconf))
|
||||||
return (TOO_MANY_LOCAL);
|
return (TOO_MANY_LOCAL);
|
||||||
}
|
|
||||||
|
|
||||||
if((aconf->status & CONF_CLIENT) &&
|
if((aconf->status & CONF_CLIENT) &&
|
||||||
ConfCurrUsers(aconf) >= ConfMaxUsers(aconf) && ConfMaxUsers(aconf) > 0)
|
ConfCurrUsers(aconf) >= ConfMaxUsers(aconf) && ConfMaxUsers(aconf) > 0)
|
||||||
|
|
Loading…
Reference in a new issue