aboutsummaryrefslogtreecommitdiffstats
path: root/nt/cmdproxy.c
diff options
context:
space:
mode:
authorDaniel Colascione2011-04-26 21:19:15 -0700
committerDaniel Colascione2011-04-26 21:19:15 -0700
commitfe9c230b7fdb2e1560449a553def0f7002a1cdd9 (patch)
tree507a88d3c58291546486598805e9dc5618c38a81 /nt/cmdproxy.c
parent40697cd9ed9e6ee943c81f18f40ead453bb79b1e (diff)
downloademacs-fe9c230b7fdb2e1560449a553def0f7002a1cdd9.tar.gz
emacs-fe9c230b7fdb2e1560449a553def0f7002a1cdd9.zip
* 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.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)
362 state = NORMAL; 362 state = NORMAL;
363 break; 363 break;
364 case INSIDE_QUOTE: 364 case INSIDE_QUOTE:
365 *new_pos++ = c; 365 switch (c)
366 if (c == '"') 366 {
367 state = NORMAL; 367 case '"':
368 368 *new_pos++ = c;
369 state = NORMAL;
370 break;
371 case '%':
372 case '!':
373 /* Variable substitution inside quote. Bail out. */
374 return 0;
375 default:
376 *new_pos++ = c;
377 break;
378 }
369 break; 379 break;
370 } 380 }
371 } 381 }