]> 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:13 +0000 (06:47 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 6 Dec 1999 06:47:13 +0000 (06:47 +0000)
Otherwise there would be division by zero.

insults.h

index f6918ccfbdd26ad892d751f43d295719f015ef30..0d738665813701de27f6b826d3c1b49a18614eef 100644 (file)
--- a/insults.h
+++ b/insults.h
@@ -37,6 +37,8 @@
 #ifndef _SUDO_INSULTS_H
 #define _SUDO_INSULTS_H
 
+#if defined(HAL_INSULTS) || defined(GOONS_INSULTS) || defined(CLASSIC_INSULTS) || defined(CSOPS_INSULTS)
+
 /*
  * Use one or more set of insults as determined by configure
  */
@@ -73,4 +75,6 @@ char *insults[] = {
  */
 #define INSULT         (insults[time(NULL) % NOFINSULTS])
 
+#endif /* HAL_INSULTS || GOONS_INSULTS || CLASSIC_INSULTS || CSOPS_INSULTS */
+
 #endif /* _SUDO_INSULTS_H */