From: Mathieu Desnoyers Date: Thu, 16 Apr 2015 21:14:53 +0000 (-0400) Subject: Be more restrictive in provider name check X-Git-Tag: v2.7.0-rc1~55 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=021153c017dd6cb9dc5ec5fe74fadd6536f1327d;p=lttng-modules.git Be more restrictive in provider name check Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-probes.c b/lttng-probes.c index b5a7fc80..ee75e33d 100644 --- a/lttng-probes.c +++ b/lttng-probes.c @@ -60,6 +60,14 @@ int check_event_provider(struct lttng_probe_desc *desc) desc->provider, provider_name_len)) return 0; /* provider mismatch */ + /* + * The event needs to contain at least provider name + _ + + * one or more letter. + */ + if (strlen(desc->event_desc[i]->name) <= provider_name_len + 1) + return 0; /* provider mismatch */ + if (desc->event_desc[i]->name[provider_name_len] != '_') + return 0; /* provider mismatch */ } return 1; }