HomeFreeBSD

Properly null-terminate strings in a kernel dump header. A version string

Description

Properly null-terminate strings in a kernel dump header. A version string
longer than 192 bytes will cause the version field of a dump header to
overflow. strncpy doesn't null terminate it, so savecore will print a
corrupted info file. Using strlcpy fixes the bug.

Differential Revision: https://reviews.freebsd.org/D2560
Reviewed by: markj
MFC after: 3 weeks
Sponsored by: Spectra Logic

Details

Provenance
asomersAuthored on
Reviewer
markj
Differential Revision
D2560: Properly null-terminate strings in a kernel dump header
Parents
rS283114: Fixup to the kern_psignal manpage
Branches
Unknown
Tags
Unknown