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 66B8B1382C5 for ; Tue, 20 Feb 2018 22:36:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 97023E085E; Tue, 20 Feb 2018 22:36:52 +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 765E5E085E for ; Tue, 20 Feb 2018 22:36:52 +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 BCDF0335C2A for ; Tue, 20 Feb 2018 22:36:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E70B521D for ; Tue, 20 Feb 2018 22:36:48 +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: <1519164075.3c031ca9780c555817fe9ccb8b23ceb231129724.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/rc-plugin.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 3c031ca9780c555817fe9ccb8b23ceb231129724 X-VCS-Branch: master Date: Tue, 20 Feb 2018 22:36:48 +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: a5503a3a-ad97-453c-b56f-29fbe931fcbb X-Archives-Hash: 0dbc18c11f8b8f51414ddbf441e9126f commit: 3c031ca9780c555817fe9ccb8b23ceb231129724 Author: William Hubbs gmail com> AuthorDate: Tue Feb 20 22:01:15 2018 +0000 Commit: William Hubbs gentoo org> CommitDate: Tue Feb 20 22:01:15 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=3c031ca9 rc-plubin.c: remove references to PATH_MAX src/rc/rc-plugin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rc/rc-plugin.c b/src/rc/rc-plugin.c index e4650b1d..31ccd341 100644 --- a/src/rc/rc-plugin.c +++ b/src/rc/rc-plugin.c @@ -68,7 +68,7 @@ rc_plugin_load(void) DIR *dp; struct dirent *d; PLUGIN *plugin; - char file[PATH_MAX]; + char *file = NULL; void *h; int (*fptr)(RC_HOOK, const char *); @@ -85,8 +85,9 @@ rc_plugin_load(void) if (d->d_name[0] == '.') continue; - snprintf(file, sizeof(file), RC_PLUGINDIR "/%s", d->d_name); + xasprintf(&file, RC_PLUGINDIR "/%s", d->d_name); h = dlopen(file, RTLD_LAZY); + free(file); if (h == NULL) { eerror("dlopen: %s", dlerror()); continue;