]> Savannah Git Hosting - gnulib.git/commitdiff
spawn-pipe: Fix SIGSEGV on OS/2 kLIBC.
authorKO Myung-Hun <komh78@gmail.com>
Mon, 18 Jan 2021 16:40:13 +0000 (01:40 +0900)
committerBruno Haible <bruno@clisp.org>
Tue, 19 Jan 2021 18:26:14 +0000 (19:26 +0100)
* lib/spawn-pipe.c [OS/2 kLIBC]: Check directory correctly if it means
a current directory.

ChangeLog
lib/spawn-pipe.c

index 94a6b5f52c59ee3c365314664892235eb4efe957..269577caa063a4b3a6cff58a53316bdc0ab48ad9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-19  KO Myung-Hun  <komh78@gmail.com>
+
+       spawn-pipe: Fix SIGSEGV on OS/2 kLIBC.
+       * lib/spawn-pipe.c [OS/2 kLIBC]: Check directory correctly if it means
+       a current directory.
+
 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
 
        dirent: Fix compilation error in C++ mode on OS/2 kLIBC.
index 641e9216fb9a653aa53cec77fdb2b4cf612e0b0f..0fe86ffe2c09f809a4148c4990909ed2d5b23806 100644 (file)
@@ -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;