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 In pfr_fix_anchor(), change an overlapping b...



details:   https://anonhg.NetBSD.org/src/rev/806e5381bf76
branches:  trunk
changeset: 1016816:806e5381bf76
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Dec 04 00:41:10 2020 +0000

description:
In pfr_fix_anchor(), change an overlapping bcopy() call to a memmove()
call.

diffstat:

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

diffs (27 lines):

diff -r 0d0d89b6fda9 -r 806e5381bf76 sys/dist/pf/net/pf_table.c
--- a/sys/dist/pf/net/pf_table.c        Fri Dec 04 00:38:08 2020 +0000
+++ b/sys/dist/pf/net/pf_table.c        Fri Dec 04 00:41:10 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pf_table.c,v 1.18 2018/02/14 16:07:55 maya Exp $       */
+/*     $NetBSD: pf_table.c,v 1.19 2020/12/04 00:41:10 thorpej Exp $    */
 /*     $OpenBSD: pf_table.c,v 1.70 2007/05/23 11:53:45 markus Exp $    */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pf_table.c,v 1.18 2018/02/14 16:07:55 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pf_table.c,v 1.19 2020/12/04 00:41:10 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1786,7 +1786,7 @@
                off = 1;
                while (*++path == '/')
                        off++;
-               bcopy(path, anchor, siz - off);
+               memmove(anchor, path, siz - off);
                memset(anchor + siz - off, 0, off);
        }
        if (anchor[siz - 1])



Home | Main Index | Thread Index | Old Index