1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

F #2456 Escape "$" at VM templates (#2529)

(cherry picked from commit 9182eee7706aeb705d3c729ce5c296538701cf91)
This commit is contained in:
Christian González 2018-10-22 17:38:05 +02:00 committed by Ruben S. Montero
parent 37eb3baf3e
commit 896872bf9d

View File

@ -46,6 +46,12 @@
%x VALUE
%%
/* ------------------------------------------------------------------------- */
/* Just copy the string verbatim till we find a variable (starts with $) */
/* ------------------------------------------------------------------------- */
([^\$\\]|"\\\$"|\\[^\$])+ { yylval_param->val_str = mem_collector_strdup(mc,yytext); return RSTRING;}
/* ------------------------------------------------------------------------- */
/* Parse variables in the form: */
/* $VARIABLE */
@ -86,13 +92,6 @@
<VAR><<EOF>> { yylval_param->val_char = '\0';
BEGIN(INITIAL);
return EOA;}
/* ------------------------------------------------------------------------- */
/* Just copy the string verbatim till we find a variable (starts with $) */
/* ------------------------------------------------------------------------- */
[^\$]+ { yylval_param->val_str = mem_collector_strdup(mc,yytext); return RSTRING;}
%%
int vm_var_wrap(yyscan_t scanner)