Warn that wildcards must be used as the last character in a string
[lttng-tools.git] / src / lib / lttng-ctl / lttng-ctl.c
index a92bf39125b287528d202d9160e09d7b7c7462f2..b9dc1efb095de163ff3d4ca50bfba28ed6596378 100644 (file)
@@ -74,6 +74,7 @@ static int connected;
  */
 int lttng_opt_quiet;
 int lttng_opt_verbose;
+int lttng_opt_mi;
 
 /*
  * Copy string from src to dst and enforce null terminated byte.
@@ -824,6 +825,12 @@ static int generate_filter(char *filter_expression,
                ret = -LTTNG_ERR_FILTER_INVAL;
                goto parse_error;
        }
+       /* Validate strings used as literals in the expression */
+       ret = filter_visitor_ir_validate_string(ctx);
+       if (ret) {
+               ret = -LTTNG_ERR_FILTER_INVAL;
+               goto parse_error;
+       }
        dbg_printf("done\n");
 
        dbg_printf("Generating bytecode... ");
This page took 0.024041 seconds and 5 git commands to generate.