diff options
author | Daniel Colascione <dan.colascione@gmail.com> | 2011-04-26 21:19:15 -0700 |
---|---|---|
committer | Daniel Colascione <dan.colascione@gmail.com> | 2011-04-26 21:19:15 -0700 |
commit | fe9c230b7fdb2e1560449a553def0f7002a1cdd9 (patch) | |
tree | 507a88d3c58291546486598805e9dc5618c38a81 /nt/cmdproxy.c | |
parent | 40697cd9ed9e6ee943c81f18f40ead453bb79b1e (diff) | |
download | emacs-fe9c230b7fdb2e1560449a553def0f7002a1cdd9.tar.gz |
* cmdproxy.c (try_dequote_cmdline): Notice variable substitutions in
quoted strings and bail out.
Diffstat (limited to 'nt/cmdproxy.c')
-rw-r--r-- | nt/cmdproxy.c | 18 |
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; } } |