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 7B62F1382C5 for ; Fri, 16 Feb 2018 20:07:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ADFA5E0ACF; Fri, 16 Feb 2018 20:07:45 +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 90735E0ACF for ; Fri, 16 Feb 2018 20:07:45 +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 AC1F9335C2A for ; Fri, 16 Feb 2018 20:07:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6D72A211 for ; Fri, 16 Feb 2018 20:07: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: <1518719019.9e14b35da8942bd8fa552363617c3415887f485f.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/rc-update.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 9e14b35da8942bd8fa552363617c3415887f485f X-VCS-Branch: master Date: Fri, 16 Feb 2018 20:07: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: 314fcc04-63bf-44f9-bc08-ce3ee0e35607 X-Archives-Hash: cff3236a05f4c13d18e7f47d94a65e53 commit: 9e14b35da8942bd8fa552363617c3415887f485f Author: William Hubbs gmail com> AuthorDate: Thu Feb 15 18:23:39 2018 +0000 Commit: William Hubbs gentoo org> CommitDate: Thu Feb 15 18:23:39 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=9e14b35d rc-update: remove reference to PATH_MAX src/rc/rc-update.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rc/rc-update.c b/src/rc/rc-update.c index 9bc1fe5b..abe40b88 100644 --- a/src/rc/rc-update.c +++ b/src/rc/rc-update.c @@ -166,7 +166,7 @@ show(RC_STRINGLIST *runlevels, bool verbose) RC_STRING *runlevel; RC_STRINGLIST *in; bool inone; - char buffer[PATH_MAX]; + char *buffer = NULL; size_t l; rc_stringlist_sort(&services); @@ -182,9 +182,11 @@ show(RC_STRINGLIST *runlevels, bool verbose) inone = true; } else { l = strlen(runlevel->value); + buffer = xmalloc(l+1); memset (buffer, ' ', l); buffer[l] = 0; rc_stringlist_add (in, buffer); + free(buffer); } }