HomeFreeBSD

route: avoid overlapping strcpy

Description

route: avoid overlapping strcpy

Passing overlapping buffers to strcpy yields an undefined result, so
let's avoid it. The copy doesn't really need to happen anyways, we can
just point to the domain part of the hostname.

This was discovered with _FORTIFY_SOURCE.

Sponsored by: Klara, Inc.
Sponsored by: Stormshield
Reviewed by: allanjude, emaste, imp, melifaro (all previous version)
Differential Revision: https://reviews.freebsd.org/D32615

Details

Provenance
kevansAuthored on Jul 23 2024, 8:25 PM
Reviewer
allanjude
Differential Revision
D32615: route: avoid overlapping strcpy
Parents
rGa90b9d015907: wpa: Import 2.11
Branches
Unknown
Tags
Unknown