aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2018-02-20 16:01:15 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-02-20 16:01:15 -0600
commit3c031ca9780c555817fe9ccb8b23ceb231129724 (patch)
treee45faad227d22d862d80ef66bbc03d07817fd4ad /src
parent8e02406d8fbf92167c30431987d5de8de72cd7df (diff)
rc-plubin.c: remove references to PATH_MAX
Diffstat (limited to 'src')
-rw-r--r--src/rc/rc-plugin.c5
1 files 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;