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.10.2~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a04a4f93379fa178ef10e0f408c296a2db2fa7ff;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, ':'))