fix another bug in "ipfw set N ..."

Submitted by:	Marcin Wisnicki
This commit is contained in:
luigi 2010-03-24 23:06:16 +00:00
parent 36597750de
commit 45fd7e5066

View File

@ -2656,7 +2656,7 @@ ipfw_add(char *av[])
}
/* [set N] -- set number (0..RESVD_SET), optional */
if (av[0] && !av[1] && _substrcmp(*av, "set") == 0) {
if (av[0] && av[1] && _substrcmp(*av, "set") == 0) {
int set = strtoul(av[1], NULL, 10);
if (set < 0 || set > RESVD_SET)
errx(EX_DATAERR, "illegal set %s", av[1]);