mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-10 15:56:18 +00:00
* cmdproxy.c (try_dequote_cmdline): Notice variable substitutions in
quoted strings and bail out.
This commit is contained in:
parent
40697cd9ed
commit
fe9c230b7f
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user