HomeFreeBSD

tcpdrop: ensure NUL termination of a string

Description

tcpdrop: ensure NUL termination of a string

strncpy did not guarantee NUL termination of the "stack" string.
Use strlcpy instead. While I'm here, avoid unnecessary memset
and strnlen calls.

Reported by: Coverity
CID: 1381035
Sponsored by: Dell EMC

Details

Provenance
vangyzenAuthored on
Parents
rS334264: Print the full-width pointer values in hex.
Branches
Unknown
Tags
Unknown