mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-12 22:30:12 +00:00
(wordexp): Explicit null words should be kept.
This commit is contained in:
parent
0e15452ddf
commit
61027dc82d
@ -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 '~':
|
||||
|
Loading…
Reference in New Issue
Block a user