Page MenuHomeFreeBSD

route: avoid overlapping strcpy
ClosedPublic

Authored by kevans on Oct 23 2021, 6:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jan 19, 11:42 PM
Unknown Object (File)
Sun, Jan 19, 12:40 PM
Unknown Object (File)
Sun, Jan 19, 12:21 PM
Unknown Object (File)
Sun, Jan 19, 9:21 AM
Unknown Object (File)
Sat, Jan 18, 1:36 AM
Unknown Object (File)
Nov 25 2024, 8:17 PM
Unknown Object (File)
Nov 21 2024, 9:41 PM
Unknown Object (File)
Oct 19 2024, 5:04 PM
Subscribers

Details

Summary

Passing overlapping buffers to strcpy yields an undefined result, so
let's avoid it. The copy doesn't really need to happen anyways.

This was discovered with _FORTIFY_SOURCE.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable