authd: avoid crash on full reload

This commit is contained in:
Elizabeth Myers 2016-04-02 20:10:17 -05:00
parent 4dbed1ed61
commit 7c4b574e1b

View file

@ -104,13 +104,13 @@ handle_reload(int parc, char *parv[])
{
authd_reload_handler handler;
if(parc < 2)
if(parc <= 2)
{
/* Reload all handlers */
for(size_t i = 0; i < 256; i++)
{
if ((handler = authd_reload_handlers[(unsigned char) i]) != NULL)
handler(parv[1][0]);
handler('\0');
}
return;