chmode: properly validate chm_throttle mode parameters

This commit is contained in:
William Pitcock 2016-01-05 19:02:44 -06:00
parent 5810d36e0a
commit 90552e214c

View file

@ -1165,7 +1165,7 @@ chm_throttle(struct Client *source_p, struct Channel *chptr,
{
sscanf(parv[(*parn)], "%d:%d", &joins, &timeslice);
if(!joins || !timeslice)
if(joins <= 0 || timeslice <= 0)
return;
mode_changes[mode_count].letter = c;