From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2719D1382C5 for ; Wed, 9 May 2018 22:36:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F501E09E0; Wed, 9 May 2018 22:36:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 092DAE09E0 for ; Wed, 9 May 2018 22:35:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8D67B335C77 for ; Wed, 9 May 2018 22:35:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AB290260 for ; Wed, 9 May 2018 22:35:56 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1525905008.2b1392af2fe9e5dfc8eda2f19d896efdc41840bf.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/rc-logger.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 2b1392af2fe9e5dfc8eda2f19d896efdc41840bf X-VCS-Branch: master Date: Wed, 9 May 2018 22:35:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0d357d8c-36e3-46c6-9805-97ff8895f89f X-Archives-Hash: c0392c36be10638463b7af95c8d0fcfc commit: 2b1392af2fe9e5dfc8eda2f19d896efdc41840bf Author: William Hubbs gmail com> AuthorDate: Wed May 9 22:30:08 2018 +0000 Commit: William Hubbs gentoo org> CommitDate: Wed May 9 22:30:08 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=2b1392af 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rc/rc-logger.c b/src/rc/rc-logger.c index 062ce3d9..1da3f59c 100644 --- a/src/rc/rc-logger.c +++ b/src/rc/rc-logger.c @@ -87,8 +87,9 @@ write_log(int logfd, const char *buffer, size_t bytes) } if (!in_escape) { - if (write(logfd, p++, 1) == -1) - eerror("write: %s", strerror(errno)); + if (isprint((unsigned char) *p) || *p == '\n') + if (write(logfd, p++, 1) == -1) + eerror("write: %s", strerror(errno)); continue; }