HomeFreeBSD

MFC r318304: getusershell: don't write paste end of buffer reading shells

Description

MFC r318304: getusershell: don't write paste end of buffer reading shells

_local_initshells did not reset cp to the beginning of the line buffer for
every iteration that it called fgets(3), leading to writing past the end of
line with fairly long /etc/shells or excessively long line lengths. Correct
this by properly resetting cp.

PR: 192528

Details

Provenance
kevansAuthored on
Parents
rS330080: Avoid using the C++11 auto keyword, which was introduced in r328555, as
Branches
Unknown
Tags
Unknown