From: Mathieu Desnoyers Date: Tue, 20 Feb 2018 14:27:23 +0000 (-0500) Subject: Fix: string comparison on incorrect length in context provider X-Git-Tag: v2.9.3~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=85b61f5719615e8ec6df8ecdcaa8f5a4a7adfb29;p=lttng-ust.git Fix: string comparison on incorrect length in context provider Fixes: #1154 Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/lttng-context-provider.c b/liblttng-ust/lttng-context-provider.c index 8e065abe..5557b137 100644 --- a/liblttng-ust/lttng-context-provider.c +++ b/liblttng-ust/lttng-context-provider.c @@ -71,7 +71,7 @@ int lttng_ust_context_provider_register(struct lttng_ust_context_provider *provi lttng_ust_fixup_tls(); /* Provider name starts with "$app.". */ - if (strncmp("$app.", provider->name, strlen("$app.") != 0)) + if (strncmp("$app.", provider->name, strlen("$app.")) != 0) return -EINVAL; /* Provider name cannot contain a column character. */ if (strchr(provider->name, ':'))