From: Todd C. Miller Date: Mon, 6 Dec 1999 06:47:19 +0000 (+0000) Subject: Don't allow insults to be enabled if the insults[] array is empty. X-Git-Tag: SUDO_1_6_1~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8446da40fb450135290ded41ec1aa3a02da36031;p=sudo Don't allow insults to be enabled if the insults[] array is empty. Otherwise there would be division by zero. --- diff --git a/auth/sudo_auth.c b/auth/sudo_auth.c index 90b6f5713..4c27b7395 100644 --- a/auth/sudo_auth.c +++ b/auth/sudo_auth.c @@ -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)); }