aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2018-05-22 17:11:43 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-05-22 17:11:43 -0500
commit7e56a49e23c810673b83e48eb9ca36229bb4016e (patch)
tree1785fd464ca725e6050c19b8411100c433880eb9 /src
parentfa5aea80c50fb724d2c98a6542307adbafd0e62d (diff)
Logger: only log printable characters and newlines
X-Gentoo-Bug: 651412 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651412
Diffstat (limited to 'src')
-rw-r--r--src/rc/rc-logger.c2
1 files changed, 2 insertions, 0 deletions
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;