Fix possible segmentation fault.

PR:		203494
MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2015-10-03 03:12:57 +00:00
parent 15395998e9
commit 56afe65ca9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288528

View File

@ -3625,7 +3625,7 @@ compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, struct tidx *tstate)
action->opcode = O_NAT;
action->len = F_INSN_SIZE(ipfw_insn_nat);
CHECK_ACTLEN;
if (_substrcmp(*av, "global") == 0) {
if (*av != NULL && _substrcmp(*av, "global") == 0) {
action->arg1 = 0;
av++;
break;