diff options
author | maxim <maxim@FreeBSD.org> | 2006-09-29 08:00:40 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2006-09-29 08:00:40 +0000 |
commit | 54f179c406f0a468fe6fc0c181d1b80a8a6ab536 (patch) | |
tree | 5af47f75cd5c5b4c374dab4a0d37f6cf90095b17 /sbin/ipfw | |
parent | 9952e77633b69a58a0637d20c5cd9dd8992b05d7 (diff) | |
download | FreeBSD-src-54f179c406f0a468fe6fc0c181d1b80a8a6ab536.zip FreeBSD-src-54f179c406f0a468fe6fc0c181d1b80a8a6ab536.tar.gz |
o Check for a required "pathname" argument presence.
PR: bin/95146
Submitted by: candy-sendpr@kgc.co.jp
MFC after: 3 weeks
Diffstat (limited to 'sbin/ipfw')
-rw-r--r-- | sbin/ipfw/ipfw2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 2c12189..47c4a59 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; |