valeriyvdovin / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

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

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