]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r318304: getusershell: don't write paste end of buffer reading shells
authorkevans <kevans@FreeBSD.org>
Tue, 27 Feb 2018 19:24:06 +0000 (19:24 +0000)
committerkevans <kevans@FreeBSD.org>
Tue, 27 Feb 2018 19:24:06 +0000 (19:24 +0000)
commitf7b2207337171c9610c87feb6417920aee2f5c5b
treefa781be90bdd13df2ca602f5fcb6eaed1c627628
parent990a4737ef3b2f9c26a0b116d08224bc8e93b44f
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
lib/libc/gen/getusershell.c