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,8 +87,9 @@ write_log(int logfd, const char *buffer, size_t bytes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!in_escape) {
|
if (!in_escape) {
|
||||||
if (write(logfd, p++, 1) == -1)
|
if (isprint((unsigned char) *p) || *p == '\n')
|
||||||
eerror("write: %s", strerror(errno));
|
if (write(logfd, p++, 1) == -1)
|
||||||
|
eerror("write: %s", strerror(errno));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user