mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 14:50:17 +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)
|
if (error)
|
||||||
goto do_error;
|
goto do_error;
|
||||||
|
|
||||||
|
if (!word_length)
|
||||||
|
{
|
||||||
|
error = w_addword (pwordexp, NULL);
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '\'':
|
case '\'':
|
||||||
@ -2246,6 +2254,14 @@ wordexp (const char *words, wordexp_t *pwordexp, int flags)
|
|||||||
if (error)
|
if (error)
|
||||||
goto do_error;
|
goto do_error;
|
||||||
|
|
||||||
|
if (!word_length)
|
||||||
|
{
|
||||||
|
error = w_addword (pwordexp, NULL);
|
||||||
|
|
||||||
|
if (error)
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '~':
|
case '~':
|
||||||
|
Loading…
Reference in New Issue
Block a user