quoted strings and bail out.
+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.
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;
}
}