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.11.0-rc1~19 X-Git-Url: http://git.liburcu.org/?p=lttng-ust.git;a=commitdiff_plain;h=fe94775b5ea73048692bad31448fbc8eb898234e 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, ':'))