]> git.ipfire.org Git - thirdparty/shadow.git/commit
Handle malformed lines in hushlogins file. 433/head
authorTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 29 Oct 2021 17:44:46 +0000 (19:44 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 29 Oct 2021 17:50:38 +0000 (19:50 +0200)
commit63a96706b1205f91c4a57de21ac56e996d270ff1
tree73e8b966d730be9631bbf5acbf710f3231fa1864
parentf2476d3ce82a9bf28282e750861d9d68d8a3f2a0
Handle malformed lines in hushlogins file.

If a line in hushlogins file, e.g. /etc/hushlogins, starts with
'\0', then current code performs an out of boundary write.
If the line lacks a newline at the end, then another character is
overridden.

With strcspn both cases are solved.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libmisc/hushed.c