diff options
author | ae <ae@FreeBSD.org> | 2015-10-03 03:12:57 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2015-10-03 03:12:57 +0000 |
commit | 8472d6f85dc76a4dbc89975877d989351400d9d7 (patch) | |
tree | dec849e5d0873bfbc8a1c61f7c7406c27b712f35 /sbin/ipfw/ipfw2.c | |
parent | 792bb43e5b8131ff6d91d493d0042d75c58db5c0 (diff) | |
download | FreeBSD-src-8472d6f85dc76a4dbc89975877d989351400d9d7.zip FreeBSD-src-8472d6f85dc76a4dbc89975877d989351400d9d7.tar.gz |
Fix possible segmentation fault.
PR: 203494
MFC after: 1 week
Diffstat (limited to 'sbin/ipfw/ipfw2.c')
-rw-r--r-- | sbin/ipfw/ipfw2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 8ad8f90..bc8af9f 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; |