From: Mathieu Desnoyers Date: Fri, 10 Mar 2017 21:51:17 +0000 (-0500) Subject: Fix: out of bound array access in filter code X-Git-Tag: v2.10.0-rc1~8 X-Git-Url: http://git.lttng.org/?p=lttng-modules.git;a=commitdiff_plain;h=83fb57abd09e1e652396a4b6a18cdf71b02db91f Fix: out of bound array access in filter code Fix ported from lttng-ust, initially found by Coverity. Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-filter.c b/lttng-filter.c index 3193d6ba..ed4bc5bb 100644 --- a/lttng-filter.c +++ b/lttng-filter.c @@ -134,6 +134,16 @@ static const char *opnames[] = { /* load userspace field ref */ [ FILTER_OP_LOAD_FIELD_REF_USER_STRING ] = "LOAD_FIELD_REF_USER_STRING", [ FILTER_OP_LOAD_FIELD_REF_USER_SEQUENCE ] = "LOAD_FIELD_REF_USER_SEQUENCE", + + /* + * load immediate star globbing pattern (literal string) + * from immediate. + */ + [ FILTER_OP_LOAD_STAR_GLOB_STRING ] = "LOAD_STAR_GLOB_STRING", + + /* globbing pattern binary operator: apply to */ + [ FILTER_OP_EQ_STAR_GLOB_STRING ] = "EQ_STAR_GLOB_STRING", + [ FILTER_OP_NE_STAR_GLOB_STRING ] = "NE_STAR_GLOB_STRING", }; const char *lttng_filter_print_op(enum filter_op op)