summaryrefslogtreecommitdiff
path: root/function.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2005-02-28 09:41:25 +0000
committerPaul Smith <psmith@gnu.org>2005-02-28 09:41:25 +0000
commita2232470c27151ba0c1c37f3eba1e35396d7eabf (patch)
tree114e7f14497e728849bf30374145ec9383212905 /function.c
parentd2516343bc5c105543b22eed3b073a8a4e14a659 (diff)
downloadgunmake-a2232470c27151ba0c1c37f3eba1e35396d7eabf.tar.gz
- Fix bug #7144 (infinite loop sometimes with -q and double-colon rules)
- Resolve support request #103195 (rationalize wordlist fn arguments)
Diffstat (limited to 'function.c')
-rw-r--r--function.c4
1 files changed, 4 insertions, 0 deletions
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)