summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw
diff options
context:
space:
mode:
authormaxim <maxim@FreeBSD.org>2006-09-29 08:00:40 +0000
committermaxim <maxim@FreeBSD.org>2006-09-29 08:00:40 +0000
commit54f179c406f0a468fe6fc0c181d1b80a8a6ab536 (patch)
tree5af47f75cd5c5b4c374dab4a0d37f6cf90095b17 /sbin/ipfw
parent9952e77633b69a58a0637d20c5cd9dd8992b05d7 (diff)
downloadFreeBSD-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.c2
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;
OpenPOWER on IntegriCloud