Author: loos
Date: Thu Aug 27 14:07:28 2015
New Revision: 287207
URL: https://svnweb.freebsd.org/changeset/base/287207

Log:
  MFC r287119:
  
    Reapply r196551 which was accidentally reverted by r223637 (update to
    OpenBSD pf 4.5).
  
    Fix argument ordering to memcpy as well as the size of the copy in the
    (theoretical) case that pfi_buffer_cnt should be greater than ~_max.
  
    This fix the failure when you hit the self table size and force it to be
    resized.
  
    Sponsored by: Rubicon Communications (Netgate)

Modified:
  stable/10/sys/netpfil/pf/pf_if.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netpfil/pf/pf_if.c
==============================================================================
--- stable/10/sys/netpfil/pf/pf_if.c    Thu Aug 27 14:00:23 2015        
(r287206)
+++ stable/10/sys/netpfil/pf/pf_if.c    Thu Aug 27 14:07:28 2015        
(r287207)
@@ -578,7 +578,7 @@ pfi_address_add(struct sockaddr *sa, int
                            __func__, V_pfi_buffer_cnt, PFI_BUFFER_MAX);
                        return;
                }
-               memcpy(V_pfi_buffer, p, V_pfi_buffer_cnt * 
sizeof(*V_pfi_buffer));
+               memcpy(p, V_pfi_buffer, V_pfi_buffer_max * 
sizeof(*V_pfi_buffer));
                /* no need to zero buffer */
                free(V_pfi_buffer, PFI_MTYPE);
                V_pfi_buffer = p;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "[email protected]"

Reply via email to