aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Colascione2011-04-26 21:19:15 -0700
committerDaniel Colascione2011-04-26 21:19:15 -0700
commitfe9c230b7fdb2e1560449a553def0f7002a1cdd9 (patch)
tree507a88d3c58291546486598805e9dc5618c38a81
parent40697cd9ed9e6ee943c81f18f40ead453bb79b1e (diff)
downloademacs-fe9c230b7fdb2e1560449a553def0f7002a1cdd9.tar.gz
emacs-fe9c230b7fdb2e1560449a553def0f7002a1cdd9.zip
* cmdproxy.c (try_dequote_cmdline): Notice variable substitutions in
quoted strings and bail out.
-rw-r--r--nt/ChangeLog5
-rw-r--r--nt/cmdproxy.c18
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 @@
12011-04-27 Daniel Colascione <dan.colascione@gmail.com>
2
3 * cmdproxy.c (try_dequote_cmdline): Notice variable substitutions
4 inside quotation marks and bail out.
5
12011-04-26 Daniel Colascione <dan.colascione@gmail.com> 62011-04-26 Daniel Colascione <dan.colascione@gmail.com>
2 7
3 * cmdproxy.c (try_dequote_cmdline): New function. 8 * 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)
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 }