From d120b1c1fc0fa79935a9d4cc55c8f49275980327 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Sun, 27 Dec 1998 11:23:05 +0000 Subject: [PATCH] Remove coredump when running "ipfw pipe" without more arguments. PR: 8937 --- sbin/ipfw/ipfw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c index 966a703cc431..22e794d6a81a 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] ;