Hello - This diff converts the existing three bcopy's to memcpy or memmove. The memcpy's are on freshly malloc'd memory so no overlap.
OK? Index: netinet/ip_ipcomp.c =================================================================== RCS file: /cvs/src/sys/netinet/ip_ipcomp.c,v retrieving revision 1.55 diff -u -p -r1.55 ip_ipcomp.c --- netinet/ip_ipcomp.c 17 Feb 2017 14:49:03 -0000 1.55 +++ netinet/ip_ipcomp.c 24 Mar 2017 16:54:37 -0000 @@ -181,7 +181,7 @@ ipcomp_input(struct mbuf *m, struct tdb tc->tc_spi = tdb->tdb_spi; tc->tc_proto = IPPROTO_IPCOMP; tc->tc_rdomain = tdb->tdb_rdomain; - bcopy(&tdb->tdb_dst, &tc->tc_dst, sizeof(union sockaddr_union)); + memcpy(&tc->tc_dst, &tdb->tdb_dst, sizeof(union sockaddr_union)); return crypto_dispatch(crp); } @@ -317,8 +317,8 @@ ipcomp_input_cb(struct cryptop *crp) /* Finally, let's relink */ m1->m_next = mo; } else { - bcopy(mtod(m1, u_char *) + roff + hlen, - mtod(m1, u_char *) + roff, + memmove(mtod(m1, u_char *) + roff, + mtod(m1, u_char *) + roff + hlen, m1->m_len - (roff + hlen)); m1->m_len -= hlen; m->m_pkthdr.len -= hlen; @@ -501,7 +501,7 @@ ipcomp_output(struct mbuf *m, struct tdb tc->tc_proto = tdb->tdb_sproto; tc->tc_skip = skip; tc->tc_rdomain = tdb->tdb_rdomain; - bcopy(&tdb->tdb_dst, &tc->tc_dst, sizeof(union sockaddr_union)); + memcpy(&tc->tc_dst, &tdb->tdb_dst, sizeof(union sockaddr_union)); /* Crypto operation descriptor */ crp->crp_ilen = m->m_pkthdr.len; /* Total input length */