Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jul 2019 09:59:22 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r349941 - head/sys/netpfil/ipfw
Message-ID:  <201907120959.x6C9xM1Z067042@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Fri Jul 12 09:59:21 2019
New Revision: 349941
URL: https://svnweb.freebsd.org/changeset/base/349941

Log:
  Do not modify cmd pointer if it is already last opcode in the rule.
  
  MFC after:	1 week

Modified:
  head/sys/netpfil/ipfw/ip_fw_eaction.c

Modified: head/sys/netpfil/ipfw/ip_fw_eaction.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw_eaction.c	Fri Jul 12 09:48:42 2019	(r349940)
+++ head/sys/netpfil/ipfw/ip_fw_eaction.c	Fri Jul 12 09:59:21 2019	(r349941)
@@ -387,7 +387,7 @@ ipfw_reset_eaction(struct ip_fw_chain *ch, struct ip_f
 	while (l > 0) {
 		cmdlen = F_LEN(cmd);
 		l -= cmdlen;
-		if (cmd->opcode == O_EXTERNAL_ACTION)
+		if (cmd->opcode == O_EXTERNAL_ACTION || l <= 0)
 			break;
 		cmd += cmdlen;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907120959.x6C9xM1Z067042>