svn commit: r288528 - head/sbin/ipfw

Andrey V. Elsukov ae at FreeBSD.org
Sat Oct 3 03:12:58 UTC 2015


Author: ae
Date: Sat Oct  3 03:12:57 2015
New Revision: 288528
URL: https://svnweb.freebsd.org/changeset/base/288528

Log:
  Fix possible segmentation fault.
  
  PR:		203494
  MFC after:	1 week

Modified:
  head/sbin/ipfw/ipfw2.c

Modified: head/sbin/ipfw/ipfw2.c
==============================================================================
--- head/sbin/ipfw/ipfw2.c	Sat Oct  3 00:57:33 2015	(r288527)
+++ head/sbin/ipfw/ipfw2.c	Sat Oct  3 03:12:57 2015	(r288528)
@@ -3625,7 +3625,7 @@ compile_rule(char *av[], uint32_t *rbuf,
 		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;


More information about the svn-src-head mailing list