From a2232470c27151ba0c1c37f3eba1e35396d7eabf Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 28 Feb 2005 09:41:25 +0000 Subject: - Fix bug #7144 (infinite loop sometimes with -q and double-colon rules) - Resolve support request #103195 (rationalize wordlist fn arguments) --- function.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'function.c') diff --git a/function.c b/function.c index 66d23fd..c2bd16f 100644 --- a/function.c +++ b/function.c @@ -771,6 +771,10 @@ func_wordlist (char *o, char **argv, const char *funcname UNUSED) _("non-numeric second argument to `wordlist' function")); start = atoi (argv[0]); + if (start < 1) + fatal (reading_file, "invalid first argument to `wordlist' function: '%d'", + message, start); + count = atoi (argv[1]) - start + 1; if (count > 0) -- cgit v1.2.3