summaryrefslogtreecommitdiff
path: root/nt/cmdproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'nt/cmdproxy.c')
-rw-r--r--nt/cmdproxy.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c
index fe128fd17c4..8c39694decc 100644
--- a/nt/cmdproxy.c
+++ b/nt/cmdproxy.c
@@ -362,10 +362,20 @@ try_dequote_cmdline (char* cmdline)
state = NORMAL;
break;
case INSIDE_QUOTE:
- *new_pos++ = c;
- if (c == '"')
- state = NORMAL;
-
+ switch (c)
+ {
+ case '"':
+ *new_pos++ = c;
+ state = NORMAL;
+ break;
+ case '%':
+ case '!':
+ /* Variable substitution inside quote. Bail out. */
+ return 0;
+ default:
+ *new_pos++ = c;
+ break;
+ }
break;
}
}