Don't allow insults to be enabled if the insults[] array is empty.

Otherwise there would be division by zero.
This commit is contained in:
Todd C. Miller
1999-12-06 06:47:19 +00:00
parent 423f6d5abe
commit 8446da40fb

View File

@@ -224,9 +224,11 @@ pass_warn(fp)
FILE *fp;
{
#ifdef INSULT
if (def_flag(I_INSULTS))
(void) fprintf(fp, "%s\n", INSULT);
else
#endif
(void) fprintf(fp, "%s\n", def_str(I_BADPASS_MSG));
}