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 C16671382C5 for ; Tue, 22 May 2018 22:12:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6742EE08FE; Tue, 22 May 2018 22:12:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 443A5E08FA for ; Tue, 22 May 2018 22:12:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 1D0B3335C88 for ; Tue, 22 May 2018 22:12:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B2AE02AF for ; Tue, 22 May 2018 22:12:43 +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: <1527027103.7e56a49e23c810673b83e48eb9ca36229bb4016e.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: 7e56a49e23c810673b83e48eb9ca36229bb4016e X-VCS-Branch: master Date: Tue, 22 May 2018 22:12:43 +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: 2755438e-9f7b-45df-ab47-e27213de7571 X-Archives-Hash: a6e1eeb1d87667f19b0c326f205c0158 commit: 7e56a49e23c810673b83e48eb9ca36229bb4016e Author: William Hubbs gmail com> AuthorDate: Tue May 22 22:11:43 2018 +0000 Commit: William Hubbs gentoo org> CommitDate: Tue May 22 22:11:43 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=7e56a49e 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 | 2 ++ 1 file changed, 2 insertions(+) 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;