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
fa5aea80c5
commit
7e56a49e23
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user