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

Submitted by:	Marcin Wisnicki
This commit is contained in:
Luigi Rizzo 2010-03-24 23:06:16 +00:00
parent ebbcc89c45
commit c72c2330d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=205631

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]);