From: Todd C. Miller Date: Mon, 6 Dec 1999 06:47:13 +0000 (+0000) Subject: Don't allow insults to be enabled if the insults[] array is empty. X-Git-Tag: SUDO_1_6_1~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=423f6d5abebc91b8a5a0d64d0bcfa0a6a8353160;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/insults.h b/insults.h index f6918ccfb..0d7386658 100644 --- 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 */