bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 7/7] spawn-pipe: Fix SIGSEGV on OS/2 kLIBC


From: KO Myung-Hun
Subject: [PATCH 7/7] spawn-pipe: Fix SIGSEGV on OS/2 kLIBC
Date: Tue, 19 Jan 2021 01:40:13 +0900

* lib/spawn-pipe.c [OS/2 kLIBC]: Check directory correctly if it means
a current directory.
---
 lib/spawn-pipe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/spawn-pipe.c b/lib/spawn-pipe.c
index 641e9216f..0fe86ffe2 100644
--- a/lib/spawn-pipe.c
+++ b/lib/spawn-pipe.c
@@ -341,7 +341,7 @@ create_pipe (const char *progname,
     }
 
 # else /* __KLIBC__ */
-  if (!(directory == NULL && strcmp (directory, ".") == 0))
+  if (!(directory == NULL || strcmp (directory, ".") == 0))
     {
       /* A directory argument is not supported in this implementation.  */
       saved_errno = EINVAL;
-- 
2.22.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]