From: Ulrich Drepper Date: Sat, 13 Nov 1999 00:44:55 +0000 (+0000) Subject: (wordexp): Explicit null words should be kept. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61027dc82de82b4e8d583de147a98617d4f2acf1;p=thirdparty%2Fglibc.git (wordexp): Explicit null words should be kept. --- diff --git a/posix/wordexp.c b/posix/wordexp.c index dde9183db5f..302cf0884f1 100644 --- a/posix/wordexp.c +++ b/posix/wordexp.c @@ -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 '~':