diff options
Diffstat (limited to 'function.c')
-rw-r--r-- | function.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) |