commit: 7e56a49e23c810673b83e48eb9ca36229bb4016e Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com> AuthorDate: Tue May 22 22:11:43 2018 +0000 Commit: William Hubbs <williamh <AT> gentoo <DOT> org> CommitDate: Tue May 22 22:11:43 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=7e56a49e
Logger: only log printable characters and newlines X-Gentoo-Bug: 651412 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651412 src/rc/rc-logger.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rc/rc-logger.c b/src/rc/rc-logger.c index 062ce3d9..22926211 100644 --- a/src/rc/rc-logger.c +++ b/src/rc/rc-logger.c @@ -87,6 +87,8 @@ write_log(int logfd, const char *buffer, size_t bytes) } if (!in_escape) { + if (!isprint((int) *p) && *p != '\n') + goto cont; if (write(logfd, p++, 1) == -1) eerror("write: %s", strerror(errno)); continue;