diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2009-08-25 10:42:28 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2009-08-25 10:42:28 +0000 |
commit | ea10b29b3a144cde6081bfd5691b6779f922cdb3 (patch) | |
tree | c4783dbcb70d251cac884b55fd5535eac1079a6b /sys | |
parent | 1505225db17436abc990841f6ef1207de7db47c9 (diff) |
Fix order of memcpy() arguments so data is copied from src to dest,
not the other way. At least partial fix for interfaces with >64
aliases. From Max Laier via Marc Balmer.
'seems right' sthen@ ok markus@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf_if.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pf_if.c b/sys/net/pf_if.c index 6a29e361025..d8c99e44c0a 100644 --- a/sys/net/pf_if.c +++ b/sys/net/pf_if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_if.c,v 1.56 2009/03/09 13:53:10 mcbride Exp $ */ +/* $OpenBSD: pf_if.c,v 1.57 2009/08/25 10:42:27 krw Exp $ */ /* * Copyright 2005 Henning Brauer <henning@openbsd.org> @@ -529,7 +529,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_cnt * sizeof(*pfi_buffer)); /* no need to zero buffer */ free(pfi_buffer, PFI_MTYPE); pfi_buffer = p; |