]> granicus.if.org Git - sudo/commitdiff
Don't allow insults to be enabled if the insults[] array is empty.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 6 Dec 1999 06:47:19 +0000 (06:47 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 6 Dec 1999 06:47:19 +0000 (06:47 +0000)
Otherwise there would be division by zero.

auth/sudo_auth.c

index 90b6f5713f9ec5937efc7ea1cea0d70b6bde3178..4c27b73954add45248e204bc238f37017b872b1e 100644 (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));
 }