Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dist/pf/net If pfi_address_add() has to extend the buffe...



details:   https://anonhg.NetBSD.org/src/rev/e89cb760c0d3
branches:  trunk
changeset: 749725:e89cb760c0d3
user:      dsl <dsl%NetBSD.org@localhost>
date:      Sun Dec 06 16:46:11 2009 +0000

description:
If pfi_address_add() has to extend the buffer, copy the data in the
right direction!
Fixes PR/41939.

diffstat:

 sys/dist/pf/net/pf_if.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 481cb5cd1a94 -r e89cb760c0d3 sys/dist/pf/net/pf_if.c
--- a/sys/dist/pf/net/pf_if.c   Sun Dec 06 16:35:16 2009 +0000
+++ b/sys/dist/pf/net/pf_if.c   Sun Dec 06 16:46:11 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pf_if.c,v 1.19 2009/07/28 18:15:26 minskim Exp $       */
+/*     $NetBSD: pf_if.c,v 1.20 2009/12/06 16:46:11 dsl Exp $   */
 /*     $OpenBSD: pf_if.c,v 1.47 2007/07/13 09:17:48 markus Exp $ */
 
 /*
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pf_if.c,v 1.19 2009/07/28 18:15:26 minskim Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pf_if.c,v 1.20 2009/12/06 16:46:11 dsl Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -583,7 +583,7 @@
                            "(%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;



Home | Main Index | Thread Index | Old Index