mirror of
https://github.com/reactos/reactos.git
synced 2026-06-20 22:17:03 +08:00
[NETSH] Do not split arguments at whitespace between quotation marks
This commit is contained in:
@@ -389,6 +389,7 @@ InterpretInteractive(VOID)
|
||||
DWORD dwArgCount = 0;
|
||||
BOOL bWhiteSpace = TRUE;
|
||||
BOOL bDone = FALSE;
|
||||
BOOL bInQuotes = FALSE;
|
||||
LPWSTR ptr;
|
||||
DWORD dwError = ERROR_SUCCESS;
|
||||
|
||||
@@ -409,7 +410,10 @@ InterpretInteractive(VOID)
|
||||
ptr = input_line;
|
||||
while (*ptr != 0)
|
||||
{
|
||||
if (iswspace(*ptr) || *ptr == L'\n')
|
||||
if (*ptr == L'\"')
|
||||
bInQuotes = (bInQuotes) ? FALSE : TRUE;
|
||||
|
||||
if ((iswspace(*ptr) && (bInQuotes == FALSE)) || *ptr == L'\n')
|
||||
{
|
||||
*ptr = 0;
|
||||
bWhiteSpace = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user