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;
        }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to