authd: fix reference far off the end of the array on shutdown
When authd has no more input it tries to reject all current clients with an id of UINT32_MAX.
This commit is contained in:
parent
2f598dacdd
commit
84d0b55e76
1 changed files with 3 additions and 5 deletions
|
@ -204,8 +204,7 @@ cancel_providers(struct auth_client *auth)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provider is done
|
/* Provider is done */
|
||||||
* WARNING: do not use auth instance after calling! */
|
|
||||||
void
|
void
|
||||||
provider_done(struct auth_client *auth, uint32_t id)
|
provider_done(struct auth_client *auth, uint32_t id)
|
||||||
{
|
{
|
||||||
|
@ -234,8 +233,7 @@ provider_done(struct auth_client *auth, uint32_t id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reject a client and cancel any outstanding providers
|
/* Reject a client and cancel any outstanding providers */
|
||||||
* WARNING: do not use auth instance after calling! */
|
|
||||||
void
|
void
|
||||||
reject_client(struct auth_client *auth, uint32_t id, const char *data, const char *fmt, ...)
|
reject_client(struct auth_client *auth, uint32_t id, const char *data, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
@ -251,7 +249,7 @@ reject_client(struct auth_client *auth, uint32_t id, const char *data, const cha
|
||||||
* --Elizafox
|
* --Elizafox
|
||||||
*/
|
*/
|
||||||
rb_helper_write(authd_helper, "R %x %c %s %s %s :%s",
|
rb_helper_write(authd_helper, "R %x %c %s %s %s :%s",
|
||||||
auth->cid, auth->data[id].provider->letter,
|
auth->cid, id != UINT32_MAX ? auth->data[id].provider->letter : '*',
|
||||||
auth->username, auth->hostname,
|
auth->username, auth->hostname,
|
||||||
data == NULL ? "*" : data, buf);
|
data == NULL ? "*" : data, buf);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue