From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1008892-garchives=archives.gentoo.org@lists.gentoo.org>
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 24A6B138331
	for <garchives@archives.gentoo.org>; Mon, 12 Mar 2018 02:43:04 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 4A345E087D;
	Mon, 12 Mar 2018 02:43:03 +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 2276AE087D
	for <gentoo-commits@lists.gentoo.org>; Mon, 12 Mar 2018 02:43:03 +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 3A5FB335C43
	for <gentoo-commits@lists.gentoo.org>; Mon, 12 Mar 2018 02:43:02 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id C26C5268
	for <gentoo-commits@lists.gentoo.org>; Mon, 12 Mar 2018 02:43:00 +0000 (UTC)
From: "William Hubbs" <williamh@gentoo.org>
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" <williamh@gentoo.org>
Message-ID: <1519950693.b46123f2e19a5eb8dc02b898e8c20a2ccc211615.williamh@OpenRC>
Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/
X-VCS-Repository: proj/openrc
X-VCS-Files: src/rc/openrc-run.c
X-VCS-Directories: src/rc/
X-VCS-Committer: williamh
X-VCS-Committer-Name: William Hubbs
X-VCS-Revision: b46123f2e19a5eb8dc02b898e8c20a2ccc211615
X-VCS-Branch: master
Date: Mon, 12 Mar 2018 02:43:00 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 0aebf757-8c8c-4676-a710-5c9ed11522c1
X-Archives-Hash: fbb4cb3190416157a5fbc7e051c64e49

commit:     b46123f2e19a5eb8dc02b898e8c20a2ccc211615
Author:     Chris Cromer <cromerc <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Fri Mar  2 00:31:33 2018 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Mar  2 00:31:33 2018 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=b46123f2

openrc-run: fix memory size (#213)

Fixes #212 

 src/rc/openrc-run.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rc/openrc-run.c b/src/rc/openrc-run.c
index daeafc52..73def8fb 100644
--- a/src/rc/openrc-run.c
+++ b/src/rc/openrc-run.c
@@ -1152,7 +1152,7 @@ int main(int argc, char **argv)
 	}
 	lnk = xmalloc(4096);
 	memset(lnk, 0, 4096);
-	if (readlink(argv[1], lnk, sizeof(lnk)-1)) {
+	if (readlink(argv[1], lnk, 4096)) {
 		dir = dirname(path);
 		if (strchr(lnk, '/')) {
 			save = xstrdup(dir);