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 14C871382C5 for ; Thu, 15 Mar 2018 01:43:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 142D0E0829; Thu, 15 Mar 2018 01:43:45 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 E79FBE0829 for ; Thu, 15 Mar 2018 01:43:44 +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 57C24335C73 for ; Thu, 15 Mar 2018 01:43:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C10DA24C for ; Thu, 15 Mar 2018 01:43:41 +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: <1521075945.5346fbf2c90b33b3abc01588e4727d4402f8db62.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/supervise-daemon.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 5346fbf2c90b33b3abc01588e4727d4402f8db62 X-VCS-Branch: master Date: Thu, 15 Mar 2018 01:43:41 +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: 51e93721-fd23-4ef3-b05a-ce151a7bcac9 X-Archives-Hash: ef3714b938414aa5852cb76ab5965a0a commit: 5346fbf2c90b33b3abc01588e4727d4402f8db62 Author: William Hubbs gmail com> AuthorDate: Thu Mar 15 01:05:45 2018 +0000 Commit: William Hubbs gentoo org> CommitDate: Thu Mar 15 01:05:45 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=5346fbf2 supervise-daemon: fix off-by-one error src/rc/supervise-daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c index 669db3a2..952c610b 100644 --- a/src/rc/supervise-daemon.c +++ b/src/rc/supervise-daemon.c @@ -232,8 +232,8 @@ static char *make_cmdline(char **argv) for (c = argv; c && *c; c++) len += (strlen(*c) + 1); - cmdline = xmalloc(len); - memset(cmdline, 0, len); + cmdline = xmalloc(len+1); + memset(cmdline, 0, len+1); for (c = argv; c && *c; c++) { strcat(cmdline, *c); strcat(cmdline, " ");