summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>1998-12-27 11:23:05 +0000
committerluigi <luigi@FreeBSD.org>1998-12-27 11:23:05 +0000
commitceacd398c6395a3e1b14c5ea2219699d0d8eeb3f (patch)
tree4a51138de54766fce16ff4fa407e7ef512ce4207 /sbin
parent60e9f493359e3fd0d9ae50fa20da108cac70dd5d (diff)
downloadFreeBSD-src-ceacd398c6395a3e1b14c5ea2219699d0d8eeb3f.zip
FreeBSD-src-ceacd398c6395a3e1b14c5ea2219699d0d8eeb3f.tar.gz
Remove coredump when running "ipfw pipe" without more arguments.
PR: 8937
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/ipfw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c
index 966a703..22e794d 100644
--- a/sbin/ipfw/ipfw.c
+++ b/sbin/ipfw/ipfw.c
@@ -16,7 +16,7 @@
*
* NEW command line interface for IP firewall facility
*
- * $Id: ipfw.c,v 1.62 1998/12/07 05:54:37 archie Exp $
+ * $Id: ipfw.c,v 1.63 1998/12/14 18:43:03 luigi Exp $
*
*/
@@ -1386,6 +1386,9 @@ ipfw_main(ac,av)
ac-- ;
av++ ;
}
+ if (!ac) {
+ show_usage("pipe requires arguments");
+ }
/* allow argument swapping */
if (ac > 1 && *av[0]>='0' && *av[0]<='9') {
char *p = av[0] ;
OpenPOWER on IntegriCloud