Fix: string comparison on incorrect length in context provider
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 20 Feb 2018 14:27:23 +0000 (09:27 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 20 Feb 2018 14:28:20 +0000 (09:28 -0500)
Fixes: #1154
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-context-provider.c

index 8e065abe3eb0c650b44fa6c507f26831591c119a..5557b137cdc24f4ed68077c7bc72d23f94e7e779 100644 (file)
@@ -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, ':'))
This page took 0.025023 seconds and 4 git commands to generate.