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 | |
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')
-rw-r--r-- | nt/ChangeLog | 5 | ||||
-rw-r--r-- | nt/cmdproxy.c | 18 |
2 files changed, 19 insertions, 4 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 2d6f8b61e19..0d03d508557 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2011-04-27 Daniel Colascione <dan.colascione@gmail.com> + + * cmdproxy.c (try_dequote_cmdline): Notice variable substitutions + inside quotation marks and bail out. + 2011-04-26 Daniel Colascione <dan.colascione@gmail.com> * cmdproxy.c (try_dequote_cmdline): New function. 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; } } |