aboutsummaryrefslogtreecommitdiff
path: root/sbin/ipfw
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/ipfw')
-rw-r--r--sbin/ipfw/ipfw2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 2c12189a69d6..47c4a59005a8 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -5309,6 +5309,8 @@ ipfw_readfile(int ac, char *av[])
*/
av += optind - 1;
ac -= optind - 1;
+ if (ac < 2)
+ errx(EX_USAGE, "no filename argument");
av[ac-1] = NULL;
fprintf(stderr, "command is %s\n", av[0]);
break;