Author: mlaier
Date: Fri Aug 28 20:26:00 2009
New Revision: 196628
URL: http://svn.freebsd.org/changeset/base/196628

Log:
  MFC r196551:
    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.
  
    Submitted by:       pjd
    Reviewed by:        {krw,sthen,mark...@openbsd.org
  
  Approved by:  re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/contrib/pf/net/pf_if.c
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/contrib/pf/net/pf_if.c
==============================================================================
--- stable/8/sys/contrib/pf/net/pf_if.c Fri Aug 28 20:07:38 2009        
(r196627)
+++ stable/8/sys/contrib/pf/net/pf_if.c Fri Aug 28 20:26:00 2009        
(r196628)
@@ -663,7 +663,7 @@ pfi_address_add(struct sockaddr *sa, int
                            "(%d/%d)\n", pfi_buffer_cnt, PFI_BUFFER_MAX);
                        return;
                }
-               memcpy(pfi_buffer, p, pfi_buffer_cnt * sizeof(*pfi_buffer));
+               memcpy(p, pfi_buffer, pfi_buffer_max * sizeof(*pfi_buffer));
                /* no need to zero buffer */
                free(pfi_buffer, PFI_MTYPE);
                pfi_buffer = p;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to