summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-08-25 23:21:05 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-08-25 23:21:05 +0000
commite1c910230ece5f1bf4fa98e259d4b7c4dc4bd59f (patch)
treed00dbc065d2785443c00e3c66748e9c92369376d /sys/net
parentddb86d0ee51641b7becb807d8bda3eaa9c0ec745 (diff)
Clearly copy the whole, and nothing but the whole, old buffer into
the resized buffer. From Pawel Jakob Dawidek via Max Laier via Marc Balmer via tech@. As was the previous commit where I didn't mention Pawel. 'should be olright' henning@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pf_if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pf_if.c b/sys/net/pf_if.c
index d8c99e44c0a..47643e12c50 100644
--- a/sys/net/pf_if.c
+++ b/sys/net/pf_if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_if.c,v 1.57 2009/08/25 10:42:27 krw Exp $ */
+/* $OpenBSD: pf_if.c,v 1.58 2009/08/25 23:21:04 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(p, pfi_buffer, 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;