diff options
author | mlaier <mlaier@FreeBSD.org> | 2009-08-28 20:26:00 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2009-08-28 20:26:00 +0000 |
commit | 3cfdb6c1906f38943e42722d977736a028c14f7e (patch) | |
tree | 334a130b3a2ce93411e0ecf49b72b7b63eb60170 /sys/contrib/pf | |
parent | 43dd289fd18bbc92ee595b923000da286859b9f8 (diff) | |
download | FreeBSD-src-3cfdb6c1906f38943e42722d977736a028c14f7e.zip FreeBSD-src-3cfdb6c1906f38943e42722d977736a028c14f7e.tar.gz |
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,markus}@openbsd.org
Approved by: re (kib)
Diffstat (limited to 'sys/contrib/pf')
-rw-r--r-- | sys/contrib/pf/net/pf_if.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/contrib/pf/net/pf_if.c b/sys/contrib/pf/net/pf_if.c index a78a545..156fb22 100644 --- a/sys/contrib/pf/net/pf_if.c +++ b/sys/contrib/pf/net/pf_if.c @@ -663,7 +663,7 @@ pfi_address_add(struct sockaddr *sa, int af, int net) "(%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; |