teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0025-shared-util-Fix-glob_extend-argument.patch

572a44
From 18f14dc669bfda1131e31f9818eabd962bda631d Mon Sep 17 00:00:00 2001
a4b143
From: Bastien Nocera <hadess@hadess.net>
a4b143
Date: Mon, 14 Oct 2013 08:15:51 +0200
a4b143
Subject: [PATCH] shared/util: Fix glob_extend() argument
a4b143
a4b143
glob_extend() would completely fail to work, or return incorrect
a4b143
data if it wasn't being passed the current getopt "optarg" variable
a4b143
as it used the global variable, instead of the passed parameters.
a4b143
---
a4b143
 src/shared/util.c | 2 +-
a4b143
 1 file changed, 1 insertion(+), 1 deletion(-)
a4b143
a4b143
diff --git a/src/shared/util.c b/src/shared/util.c
572a44
index 9be6acf..48adc83 100644
a4b143
--- a/src/shared/util.c
a4b143
+++ b/src/shared/util.c
572a44
@@ -4391,7 +4391,7 @@ int glob_extend(char ***strv, const char *path) {
a4b143
         char **p;
a4b143
 
a4b143
         errno = 0;
a4b143
-        k = glob(optarg, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
a4b143
+        k = glob(path, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
a4b143
 
a4b143
         if (k == GLOB_NOMATCH)
a4b143
                 return -ENOENT;