From 83fb57abd09e1e652396a4b6a18cdf71b02db91f Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 10 Mar 2017 16:51:17 -0500 Subject: [PATCH] Fix: out of bound array access in filter code Fix ported from lttng-ust, initially found by Coverity. Signed-off-by: Mathieu Desnoyers --- lttng-filter.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) -- 2.34.1