Logger: only log printable characters and newlines
X-Gentoo-Bug: 651412 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=651412
This commit is contained in:
parent
a3d0e293ee
commit
2b1392af2f
@ -87,6 +87,7 @@ write_log(int logfd, const char *buffer, size_t bytes)
|
||||
}
|
||||
|
||||
if (!in_escape) {
|
||||
if (isprint((unsigned char) *p) || *p == '\n')
|
||||
if (write(logfd, p++, 1) == -1)
|
||||
eerror("write: %s", strerror(errno));
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user