1
0
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:
Daniel Colascione 2011-04-26 21:19:15 -07:00
parent 40697cd9ed
commit fe9c230b7f
2 changed files with 19 additions and 4 deletions

View File

@ -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.

View File

@ -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;
}
}