From: ae Date: Sat, 3 Oct 2015 03:12:57 +0000 (+0000) Subject: Fix possible segmentation fault. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8472d6f85dc76a4dbc89975877d989351400d9d7;p=people%2Fjulieng%2Ffreebsd.git Fix possible segmentation fault. PR: 203494 MFC after: 1 week --- diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 8ad8f90cc317..bc8af9f833a6 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -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;