HomeFreeBSD

Use memmove to copy within a buffer

Description

Use memmove to copy within a buffer

jail(8) would try to use strcpy to remove the interface from the start of
an IP address. This is undefined, and on arm64 will result in unexpected
IPv6 addresses.

Fix this by using memmove top move the string.

PR: 245102
Reported by: sbruno
MFC after: 2 weeks
Sponsored by: Innovate UK

Details

Provenance
andrewAuthored on
Parents
rS359504: Use proper mdoc(7) macros for literal text and do not use Tn
Branches
Unknown
Tags
Unknown