From 7e56a49e23c810673b83e48eb9ca36229bb4016e Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Tue, 22 May 2018 17:11:43 -0500 Subject: 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(+) (limited to 'src/rc') 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; -- cgit v1.2.3