From 56afe65ca9a07a839f4bcd3865acf9ebe7660010 Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Sat, 3 Oct 2015 03:12:57 +0000 Subject: [PATCH] Fix possible segmentation fault. PR: 203494 MFC after: 1 week --- sbin/ipfw/ipfw2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;