b47e69e69e
_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 Submitted by: Kyle Evans <kevans91@ksu.edu> Reviewed by: cem, jilles Differential Revision: https://reviews.freebsd.org/D10690