HomeFreeBSD

pty(4): Use strlcpy to guarantee destination buffer isn't overrun

Description

pty(4): Use strlcpy to guarantee destination buffer isn't overrun

The devtoname() name is strcpyed into a small stack buffer. Sure, we always
expect the name to be ttyXX (or ptyXX). If that's the case, strlcpy() doesn't
hurt.

Reported by: Coverity
CID: 1006768
Sponsored by: EMC / Isilon Storage Division

Details

Provenance
cemAuthored on
Parents
rS298336: kgssapi(4): Fix string overrun in Kerberos principal construction
Branches
Unknown
Tags
Unknown