]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(wordexp): Explicit null words should be kept.
authorUlrich Drepper <drepper@redhat.com>
Sat, 13 Nov 1999 00:44:55 +0000 (00:44 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 13 Nov 1999 00:44:55 +0000 (00:44 +0000)
posix/wordexp.c

index dde9183db5f04e2f19176201e1d9647fa81e99e4..302cf0884f161db8bcf12193cbafa43d816e0223 100644 (file)
@@ -2236,6 +2236,14 @@ wordexp (const char *words, wordexp_t *pwordexp, int flags)
        if (error)
          goto do_error;
 
+       if (!word_length)
+         {
+           error = w_addword (pwordexp, NULL);
+
+           if (error)
+             return error;
+         }
+
        break;
 
       case '\'':
@@ -2246,6 +2254,14 @@ wordexp (const char *words, wordexp_t *pwordexp, int flags)
        if (error)
          goto do_error;
 
+       if (!word_length)
+         {
+           error = w_addword (pwordexp, NULL);
+
+           if (error)
+             return error;
+         }
+
        break;
 
       case '~':