Check an arguments count before proceed in sysctl_handler().

PR:		bin/56298
Submitted by:	Kang Liu <liukang@bjpu.edu.cn>
MFC after:	2 weeks

# We need a regression test suit for ipfw(2)/ipfw(8) badly.
This commit is contained in:
Maxim Konovalov 2003-09-02 10:36:40 +00:00
parent a26181dca1
commit 1c56ad9b8e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119668

View File

@ -1643,7 +1643,7 @@ sysctl_handler(int ac, char *av[], int which)
ac--;
av++;
if (*av == NULL) {
if (ac == 0) {
warnx("missing keyword to enable/disable\n");
} else if (strncmp(*av, "firewall", strlen(*av)) == 0) {
sysctlbyname("net.inet.ip.fw.enable", NULL, 0,