authd: check if handler is NULL, ensure that we do not overflow
This commit is contained in:
parent
caebeeca95
commit
c63cd21e6a
1 changed files with 5 additions and 2 deletions
|
@ -64,8 +64,11 @@ handle_reload(int parc, char *parv[])
|
||||||
if(parc < 2)
|
if(parc < 2)
|
||||||
{
|
{
|
||||||
/* Reload all handlers */
|
/* Reload all handlers */
|
||||||
for(size_t i = 0; i < sizeof(authd_reload_handlers); handler = authd_reload_handlers[i++])
|
for(size_t i = 0; i < sizeof(authd_reload_handlers); i++)
|
||||||
|
{
|
||||||
|
if ((handler = authd_reload_handlers[(unsigned char) i]) != NULL)
|
||||||
handler(parv[1][0]);
|
handler(parv[1][0]);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue