From fe94775b5ea73048692bad31448fbc8eb898234e Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 20 Feb 2018 09:27:23 -0500 Subject: [PATCH] Fix: string comparison on incorrect length in context provider Fixes: #1154 Signed-off-by: Mathieu Desnoyers --- liblttng-ust/lttng-context-provider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, ':')) -- 2.34.1