NetBSD-Bugs archive

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

kern/41939: Fixing order of arguments.



>Number:         41939
>Category:       kern
>Synopsis:       Fixing order of arguments.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 26 07:00:01 +0000 2009
>Originator:     Henning Petersen
>Release:        current-NetBSD
>Organization:
>Environment:
>Description:
Fing order of arguments.
Fix from OpenBSD.
>How-To-Repeat:

>Fix:
diff -u -r1.19 pf_if.c
--- sys/dist/pf/net/pf_if.c     28 Jul 2009 18:15:26 -0000      1.19
+++ sys/dist/pf/net/pf_if.c     26 Aug 2009 05:10:34 -0000
@@ -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_max * sizeof(*pfi_buffer));
                /* no need to zero buffer */
                free(pfi_buffer, PFI_MTYPE);
                pfi_buffer = p;



Home | Main Index | Thread Index | Old Index